From 5284a82f3fc65b89ae2df46b4a07651427c3f77d Mon Sep 17 00:00:00 2001 From: bruberu <80226372+bruberu@users.noreply.github.com> Date: Thu, 10 Oct 2024 23:41:27 -0500 Subject: [PATCH 1/3] feat: fix coagulation tank glitch --- .../primitive/MetaTileEntityCoagulationTank.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java b/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java index f97861531..c171a8e6d 100644 --- a/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java +++ b/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java @@ -68,16 +68,13 @@ public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) { protected BlockPattern createStructurePattern() { return FactoryBlockPattern.start() - .aisle(new String[]{"XXX", "XXX", "XXX"}) - .aisle(new String[]{"XXX", "XIX", "X#X"}).setRepeatable(1, 4) - .aisle(new String[]{"XXX", "XSX", "XXX"}) + .aisle("XXX", "XSX", "XXX") + .aisle("XXX", "XIX", "X#X") + .aisle("XXX", "XXX", "XXX") .where('X', states(new IBlockState[]{SuSyBlocks.COAGULATION_TANK_WALL .getState(BlockCoagulationTankWall.CoagulationTankWallType.WOODEN_COAGULATION_TANK_WALL)}) - .or(abilities(MultiblockAbility.EXPORT_ITEMS) - .setMaxGlobalLimited(1)) - .or(abilities(MultiblockAbility.IMPORT_FLUIDS) - .setMaxGlobalLimited(1))) + .or(abilities(MultiblockAbility.EXPORT_ITEMS, MultiblockAbility.IMPORT_FLUIDS))) .where('#', air()) .where('I', isIndicatorPredicate()) .where('S', this.selfPredicate()).build(); From b3fb1ccd9a113d0bcd508338e418c9629ec933d0 Mon Sep 17 00:00:00 2001 From: bruberu <80226372+bruberu@users.noreply.github.com> Date: Thu, 10 Oct 2024 23:48:55 -0500 Subject: [PATCH 2/3] fix: wait I need to reverse that still --- .../multi/primitive/MetaTileEntityCoagulationTank.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java b/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java index c171a8e6d..37f6999e6 100644 --- a/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java +++ b/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java @@ -68,9 +68,9 @@ public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) { protected BlockPattern createStructurePattern() { return FactoryBlockPattern.start() - .aisle("XXX", "XSX", "XXX") - .aisle("XXX", "XIX", "X#X") .aisle("XXX", "XXX", "XXX") + .aisle("XXX", "XIX", "X#X") + .aisle("XXX", "XSX", "XXX") .where('X', states(new IBlockState[]{SuSyBlocks.COAGULATION_TANK_WALL .getState(BlockCoagulationTankWall.CoagulationTankWallType.WOODEN_COAGULATION_TANK_WALL)}) From d0830e5efb207cfbbaa285f00b954e438553560b Mon Sep 17 00:00:00 2001 From: MCTian-mi <35869948+MCTian-mi@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:41:53 +0800 Subject: [PATCH 3/3] cleanup --- .../MetaTileEntityCoagulationTank.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java b/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java index 37f6999e6..c9bfad8ac 100644 --- a/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java +++ b/src/main/java/supersymmetry/common/metatileentities/multi/primitive/MetaTileEntityCoagulationTank.java @@ -12,7 +12,10 @@ import gregtech.api.gui.widgets.*; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.interfaces.IGregTechTileEntity; -import gregtech.api.metatileentity.multiblock.*; +import gregtech.api.metatileentity.multiblock.IMultiblockPart; +import gregtech.api.metatileentity.multiblock.MultiblockAbility; +import gregtech.api.metatileentity.multiblock.ParallelLogicType; +import gregtech.api.metatileentity.multiblock.RecipeMapPrimitiveMultiblockController; import gregtech.api.pattern.BlockPattern; import gregtech.api.pattern.FactoryBlockPattern; import gregtech.api.pattern.PatternMatchContext; @@ -66,18 +69,19 @@ public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) { return new MetaTileEntityCoagulationTank(this.metaTileEntityId); } + @NotNull + @Override protected BlockPattern createStructurePattern() { return FactoryBlockPattern.start() .aisle("XXX", "XXX", "XXX") - .aisle("XXX", "XIX", "X#X") + .aisle("XXX", "XIX", "X#X").setRepeatable(1, 4) .aisle("XXX", "XSX", "XXX") - .where('X', - states(new IBlockState[]{SuSyBlocks.COAGULATION_TANK_WALL - .getState(BlockCoagulationTankWall.CoagulationTankWallType.WOODEN_COAGULATION_TANK_WALL)}) + .where('X', states(getCasingState()) .or(abilities(MultiblockAbility.EXPORT_ITEMS, MultiblockAbility.IMPORT_FLUIDS))) .where('#', air()) .where('I', isIndicatorPredicate()) - .where('S', this.selfPredicate()).build(); + .where('S', selfPredicate()) + .build(); } public static TraceabilityPredicate isIndicatorPredicate() { @@ -90,6 +94,11 @@ public static TraceabilityPredicate isIndicatorPredicate() { }); } + protected static IBlockState getCasingState() { + return SuSyBlocks.COAGULATION_TANK_WALL + .getState(BlockCoagulationTankWall.CoagulationTankWallType.WOODEN_COAGULATION_TANK_WALL); + } + @Override public void addInformation(ItemStack stack, @Nullable World world, @NotNull List tooltip, boolean advanced) { super.addInformation(stack, world, tooltip, advanced);