Search in sources :

Example 1 with RedstoneTorch

use of org.bukkit.material.RedstoneTorch in project Glowstone by GlowstoneMC.

the class BlockRedstoneTorch 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 RedstoneTorch) {
        ((RedstoneTorch) data).setFacingDirection(face);
    } else {
        warnMaterialData(RedstoneTorch.class, data);
    }
}
Also used : RedstoneTorch(org.bukkit.material.RedstoneTorch) SimpleAttachableMaterialData(org.bukkit.material.SimpleAttachableMaterialData) MaterialData(org.bukkit.material.MaterialData)

Aggregations

MaterialData (org.bukkit.material.MaterialData)1 RedstoneTorch (org.bukkit.material.RedstoneTorch)1 SimpleAttachableMaterialData (org.bukkit.material.SimpleAttachableMaterialData)1