Skip to content

Commit

Permalink
Add forgotten API lookup for MEGA pattern provider return inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Aug 10, 2023
1 parent 64f3328 commit dbb2852
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fabric/src/main/java/gripe/_90/megacells/MEGACells.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.core.Registry;

import appeng.api.IAEAddonEntrypoint;
import appeng.api.behaviors.GenericInternalInventory;
import appeng.api.crafting.PatternDetailsHelper;
import appeng.api.networking.GridServices;
import appeng.core.AppEng;
Expand All @@ -30,6 +31,7 @@ public void onAe2Initialized() {
InitStorageCells.init();
InitUpgrades.init();

initPatternProviderTransfer();
initCompression();
}

Expand Down Expand Up @@ -61,6 +63,12 @@ private void registerAll() {
Registry.register(Registry.MENU, AppEng.makeId("mega_pattern_provider"), MEGAPatternProviderBlock.MENU);
}

@SuppressWarnings("UnstableApiUsage")
private void initPatternProviderTransfer() {
GenericInternalInventory.SIDED.registerForBlockEntity(
(be, context) -> be.getLogic().getReturnInv(), MEGABlockEntities.MEGA_PATTERN_PROVIDER);
}

private void initCompression() {
ServerLifecycleEvents.SERVER_STARTED
.register(server -> CompressionService.INSTANCE.loadRecipes(server.getRecipeManager()));
Expand Down

0 comments on commit dbb2852

Please sign in to comment.