use of org.bukkit.material.Torch in project Glowstone by GlowstoneMC.
the class BlockTorch 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 Torch) {
if (canAttachTo(state.getBlock(), face)) {
((Torch) data).setFacingDirection(face);
} else {
((Torch) data).setFacingDirection(BlockFace.UP);
}
} else {
warnMaterialData(Torch.class, data);
}
}
Aggregations