Skip to content

Commit

Permalink
Merge pull request #322 from SymmetricDevs/bru-set-free
Browse files Browse the repository at this point in the history
Fix Coagulation Tank formation glitch
  • Loading branch information
bruberu authored Oct 12, 2024
2 parents 23010b5 + d0830e5 commit 0fafc27
Showing 1 changed file with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,21 +69,19 @@ public MetaTileEntity createMetaTileEntity(IGregTechTileEntity tileEntity) {
return new MetaTileEntityCoagulationTank(this.metaTileEntityId);
}

@NotNull
@Override
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"})
.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)))
.aisle("XXX", "XXX", "XXX")
.aisle("XXX", "XIX", "X#X").setRepeatable(1, 4)
.aisle("XXX", "XSX", "XXX")
.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() {
Expand All @@ -93,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<String> tooltip, boolean advanced) {
super.addInformation(stack, world, tooltip, advanced);
Expand Down

0 comments on commit 0fafc27

Please sign in to comment.