use of club.nsdn.nyasamarailway.tileblock.signal.core.BlockTriStateSignalBox in project NyaSamaRailway by NSDN.
the class BlockPillar method checkBlock.
public boolean checkBlock(IBlockAccess world, int x, int y, int z) {
Block block = world.getBlock(x, y, z);
if (block instanceof BlockAir)
return false;
if (block instanceof BlockSlab)
return false;
if (block instanceof BlockPane)
return false;
if (block instanceof BlockWall)
return false;
if (block instanceof BlockSignalBox || block instanceof BlockSignalBoxSender || block instanceof BlockTriStateSignalBox || block instanceof BlockSignalLight || block instanceof BlockSignalLamp || block instanceof BlockSignalStick || block instanceof BlockBiSignalLight || block instanceof BlockTriSignalLight) {
if (world.getBlock(x, y - 1, z) == this)
return true;
}
if (world.getTileEntity(x, y, z) != null) {
if (!(world.getTileEntity(x, y, z) instanceof Pillar))
return false;
}
Material material = block.getMaterial();
if (material == Material.clay || material == Material.ground || material == Material.iron || material == Material.rock || material == Material.glass || material == Material.sand || material == Material.wood)
return true;
return material.isSolid();
}
Aggregations