Updated vacuum freezer multiblock. Some work for #1672

This commit is contained in:
drcrazy 2019-03-28 18:09:25 +03:00
parent 84a380f51e
commit 16ff7af929

View file

@ -25,6 +25,7 @@
package techreborn.tiles.machine.multiblock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.BlockPos;
import reborncore.client.containerBuilder.IContainerProvider;
import reborncore.client.containerBuilder.builder.BuiltContainer;
import reborncore.client.containerBuilder.builder.ContainerBuilder;
@ -57,7 +58,13 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP
}
public boolean getMultiBlock() {
return multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET);
if (multiblockChecker == null) {
return false;
}
final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET);
final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 2, 0));
final boolean chamber = multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, 1, 0));
return down && chamber && up;
}
// TileGenericMachine