use of buildcraft.core.lib.world.FakeBlockAccessSingleBlock in project BuildCraft by BuildCraft.
the class ItemFacade method isValidFacade.
public static boolean isValidFacade(IBlockState state) {
if (blacklistedFacades.contains(state)) {
return false;
}
if (whitelistedFacades.contains(state)) {
return true;
}
Block block = state.getBlock();
if (block instanceof IFluidBlock || block.hasTileEntity(state)) {
return false;
}
block.setBlockBoundsBasedOnState(new FakeBlockAccessSingleBlock(state), BlockPos.ORIGIN);
if (block.getBlockBoundsMinX() != 0.0D || block.getBlockBoundsMinY() != 0.0D || block.getBlockBoundsMinZ() != 0.0D) {
return false;
}
if (block.getBlockBoundsMaxX() != 1.0D || block.getBlockBoundsMaxY() != 1.0D || block.getBlockBoundsMaxZ() != 1.0D) {
return false;
}
return true;
}
Aggregations