diff --git a/fabric/src/main/java/gripe/_90/megacells/MEGACells.java b/fabric/src/main/java/gripe/_90/megacells/MEGACells.java index 44556214..8999c432 100644 --- a/fabric/src/main/java/gripe/_90/megacells/MEGACells.java +++ b/fabric/src/main/java/gripe/_90/megacells/MEGACells.java @@ -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; @@ -30,6 +31,7 @@ public void onAe2Initialized() { InitStorageCells.init(); InitUpgrades.init(); + initPatternProviderTransfer(); initCompression(); } @@ -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()));