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] 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);