diff --git a/src/main/java/techreborn/tiles/multiblock/TileImplosionCompressor.java b/src/main/java/techreborn/tiles/multiblock/TileImplosionCompressor.java index 5946f3e8d..9eac04524 100644 --- a/src/main/java/techreborn/tiles/multiblock/TileImplosionCompressor.java +++ b/src/main/java/techreborn/tiles/multiblock/TileImplosionCompressor.java @@ -57,6 +57,9 @@ public class TileImplosionCompressor extends TileGenericMachine implements ICont } public boolean getMutliBlock() { + if(multiblockChecker == null){ + return false; + } final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET); final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 2, 0)); final boolean chamber = multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 1, 0)); @@ -67,21 +70,13 @@ public class TileImplosionCompressor extends TileGenericMachine implements ICont @Override public void update() { if (multiblockChecker == null) { - final BlockPos downCenter = pos.offset(getFacing().getOpposite(), 2); - multiblockChecker = new MultiblockChecker(world, downCenter); + multiblockChecker = new MultiblockChecker(world, pos.down(3)); } if (!world.isRemote && getMutliBlock()){ super.update(); } } - - // TileEntity - @Override - public void validate() { - super.validate(); - multiblockChecker = new MultiblockChecker(world, pos.down(3)); - } // IContainerProvider @Override diff --git a/src/main/java/techreborn/tiles/multiblock/TileIndustrialBlastFurnace.java b/src/main/java/techreborn/tiles/multiblock/TileIndustrialBlastFurnace.java index 4d44d2636..7f3a1634e 100644 --- a/src/main/java/techreborn/tiles/multiblock/TileIndustrialBlastFurnace.java +++ b/src/main/java/techreborn/tiles/multiblock/TileIndustrialBlastFurnace.java @@ -107,6 +107,9 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC } public boolean getMutliBlock() { + if(multiblockChecker == null){ + return false; + } final boolean layer0 = multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_ANY, MultiblockChecker.ZERO_OFFSET); final boolean layer1 = multiblockChecker.checkRingY(1, 1, MultiblockChecker.CASING_ANY, new BlockPos(0, 1, 0)); final boolean layer2 = multiblockChecker.checkRingY(1, 1, MultiblockChecker.CASING_ANY, new BlockPos(0, 2, 0)); diff --git a/src/main/java/techreborn/tiles/multiblock/TileVacuumFreezer.java b/src/main/java/techreborn/tiles/multiblock/TileVacuumFreezer.java index 9ae5c5346..4a112bacf 100644 --- a/src/main/java/techreborn/tiles/multiblock/TileVacuumFreezer.java +++ b/src/main/java/techreborn/tiles/multiblock/TileVacuumFreezer.java @@ -56,24 +56,23 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP } public boolean getMultiBlock() { + if(multiblockChecker == null){ + return false; + } return multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET); } // TileGenericMachine @Override public void update() { + if(multiblockChecker == null){ + multiblockChecker = new MultiblockChecker(world, pos.down()); + } if (!world.isRemote && getMultiBlock()) { super.update(); } } - // TileEntity - @Override - public void validate() { - super.validate(); - multiblockChecker = new MultiblockChecker(world, pos.down()); - } - // IContainerProvider @Override public BuiltContainer createContainer(final EntityPlayer player) {