use of org.bukkit.material.Tree in project Glowstone by GlowstoneMC.
the class BlockLog method placeBlock.
@Override
public void placeBlock(GlowPlayer player, GlowBlockState state, BlockFace face, ItemStack holding, Vector clickedLoc) {
super.placeBlock(player, state, face, holding, clickedLoc);
MaterialData data = state.getData();
if (data instanceof Tree) {
((Tree) data).setDirection(face);
((Tree) data).setSpecies(TreeSpecies.getByData((byte) holding.getDurability()));
} else {
warnMaterialData(Tree.class, data);
}
state.setData(data);
}
Aggregations