use of mekanism.common.tile.TileEntityAdvancedBoundingBlock in project Mekanism by mekanism.
the class WorldUtils method makeAdvancedBoundingBlock.
/**
* Places a fake advanced bounding block at the defined location.
*
* @param world world to place block in
* @param boundingLocation coordinates of bounding block
* @param orig original block position
*/
public static void makeAdvancedBoundingBlock(IWorld world, BlockPos boundingLocation, BlockPos orig) {
BlockBounding boundingBlock = MekanismBlocks.ADVANCED_BOUNDING_BLOCK.getBlock();
BlockState newState = BlockStateHelper.getStateForPlacement(boundingBlock, boundingBlock.defaultBlockState(), world, boundingLocation, null, Direction.NORTH);
world.setBlock(boundingLocation, newState, BlockFlags.DEFAULT);
if (!world.isClientSide()) {
TileEntityAdvancedBoundingBlock tile = getTileEntity(TileEntityAdvancedBoundingBlock.class, world, boundingLocation);
if (tile != null) {
tile.setMainLocation(orig);
} else {
Mekanism.logger.warn("Unable to find Advanced Bounding Block Tile at: {}", boundingLocation);
}
}
}
Aggregations