static boolean isBottomSlab(IBlockState state) { return state.getBlock() instanceof BlockSlab && !((BlockSlab) state.getBlock()).isDouble() && state.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM; }
@SideOnly(Side.CLIENT) public int getMixedBrightnessForFacade(@Nonnull IBlockState bs, @Nonnull IBlockAccess worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState facade) { if (facade.getBlock() instanceof BlockSlab) { // TODO: this is wrong for glass and glowing slabs, isn't it? find a way to do them right---once we got some from somewhere if (((BlockSlab) facade.getBlock()).isDouble()) { return worldIn.getCombinedLight(pos, getLightValue(bs, worldIn, pos)); } return getNeightbourBrightness(worldIn, pos, facade.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.TOP ? EnumFacing.UP : EnumFacing.DOWN); } else if (facade.useNeighborBrightness()) { // TODO: stairs... return getNeightbourBrightness(worldIn, pos, null); } else { return worldIn.getCombinedLight(pos, getLightValue(bs, worldIn, pos)); } }
if (((BlockSlab) block).isDouble()) { count = 2;
if (((BlockSlab) block).isDouble()) { return true;
return COST_INF; // can't pillar from a ladder or vine onto something that isn't also climbable if (fromDown.getBlock() instanceof BlockSlab && !((BlockSlab) fromDown.getBlock()).isDouble() && fromDown.getValue(BlockSlab.HALF) == BlockSlab.EnumBlockHalf.BOTTOM) { return COST_INF; // can't pillar up from a bottom slab onto a non ladder
if (srcDown == Blocks.SOUL_SAND || (srcDown instanceof BlockSlab && !((BlockSlab) srcDown).isDouble())) { return COST_INF; // can't sneak and backplace against soul sand or half slabs (regardless of whether it's top half or bottom half) =/