diff --git a/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityPrimitiveSmelter.java b/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityPrimitiveSmelter.java index 07104f725..1353979fd 100644 --- a/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityPrimitiveSmelter.java +++ b/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityPrimitiveSmelter.java @@ -48,10 +48,6 @@ public MetaTileEntityPrimitiveSmelter(ResourceLocation metaTileEntityId) { super(metaTileEntityId, SuSyRecipeMaps.PRIMITIVE_SMELTER); } - public static TraceabilityPredicate casingPredicate() { - return states(ModuleCore.Blocks.MASONRY_BRICK.getDefaultState()); - } - @Override protected void initializeAbilities() { this.importItems = new ItemHandlerList(getAbilities(SuSyMultiblockAbilities.PRIMITIVE_IMPORT_ITEMS)); @@ -64,17 +60,23 @@ protected void formStructure(PatternMatchContext context) { this.initializeAbilities(); } + public static IBlockState getCasingState() { + return ModuleCore.Blocks.MASONRY_BRICK.getDefaultState(); + } + @Override protected @NotNull BlockPattern createStructurePattern() { return FactoryBlockPattern.start() - .aisle("OOO", "III", "SIS") - .aisle("OOO", "I I", "I I") - .aisle("OOO", "ICI", "SIS") - .where('I', casingPredicate().or(abilities(SuSyMultiblockAbilities.PRIMITIVE_IMPORT_ITEMS).setMaxGlobalLimited(4))) + .aisle("BBB", "BBB", "SBS") + .aisle("BBB", "B#B", "B B") + .aisle("BBB", "BCB", "SBS") + .where('B', states(getCasingState()).setMinGlobalLimited(14) + .or(abilities(SuSyMultiblockAbilities.PRIMITIVE_IMPORT_ITEMS).setPreviewCount(1)) + .or(abilities(SuSyMultiblockAbilities.PRIMITIVE_EXPORT_ITEMS).setPreviewCount(1))) .where('C', selfPredicate()) - .where('O', casingPredicate().or(abilities(SuSyMultiblockAbilities.PRIMITIVE_EXPORT_ITEMS).setMaxGlobalLimited(2))) .where('S', states(ModuleCore.Blocks.MASONRY_BRICK_SLAB.getDefaultState())) - .where(' ', air().or(SNOW_PREDICATE)) + .where('#', air().or(SNOW_PREDICATE)) + .where(' ', air()) .build(); } diff --git a/src/main/java/supersymmetry/common/metatileentities/multiblockpart/MetaTileEntityPrimitiveItemBus.java b/src/main/java/supersymmetry/common/metatileentities/multiblockpart/MetaTileEntityPrimitiveItemBus.java index 69950ce0d..825b8146e 100644 --- a/src/main/java/supersymmetry/common/metatileentities/multiblockpart/MetaTileEntityPrimitiveItemBus.java +++ b/src/main/java/supersymmetry/common/metatileentities/multiblockpart/MetaTileEntityPrimitiveItemBus.java @@ -1,5 +1,7 @@ package supersymmetry.common.metatileentities.multiblockpart; +import gregtech.api.capability.impl.NotifiableItemStackHandler; +import gregtech.api.items.itemhandlers.GTItemStackHandler; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; import gregtech.api.metatileentity.multiblock.MultiblockAbility; @@ -15,7 +17,7 @@ public class MetaTileEntityPrimitiveItemBus extends MetaTileEntityItemBus { public MetaTileEntityPrimitiveItemBus(ResourceLocation metaTileEntityId, boolean isExportHatch) { - super(metaTileEntityId, 0, isExportHatch); + super(metaTileEntityId, 1, isExportHatch); initializeInventory(); } @@ -53,4 +55,26 @@ public boolean hasGhostCircuitInventory() { public String getHarvestTool() { return "pickaxe"; } + + @Override + protected IItemHandlerModifiable createExportItemHandler() { + return !isExportHatch ? new GTItemStackHandler(this, 0) : + new NotifiableItemStackHandler(this, 4, getController(), true) { + @Override + public int getSlotLimit(int slot) { + return 16; + } + }; + } + + @Override + protected IItemHandlerModifiable createImportItemHandler() { + return isExportHatch ? new GTItemStackHandler(this, 0) : + new NotifiableItemStackHandler(this, 4, getController(), false) { + @Override + public int getSlotLimit(int slot) { + return 16; + } + }; + } }