use of org.bukkit.block.data.Bisected.Half in project NoCheatPlus by NoCheatPlus.
the class BukkitStairs method getFakeData.
@Override
public int getFakeData(final BlockCache blockCache, final World world, final int x, final int y, final int z) {
final Block block = world.getBlockAt(x, y, z);
final BlockState state = block.getState();
final BlockData blockData = state.getBlockData();
if (blockData instanceof Bisected) {
final Bisected stairs = (Bisected) blockData;
final Half half = stairs.getHalf();
// TODO: Refine later, with sub shapes.
switch(half) {
case TOP:
return 0x4;
default:
break;
}
}
return 0;
}
Aggregations