Search in sources :

Example 1 with DispenserEntity

use of net.glowstone.block.entity.DispenserEntity in project Glowstone by GlowstoneMC.

the class BlockDispenser method trigger.

public void trigger(GlowBlock block) {
    BlockEntity te = block.getBlockEntity();
    if (!(te instanceof DispenserEntity)) {
        return;
    }
    DispenserEntity teDispenser = (DispenserEntity) te;
    GlowDispenser dispenser = (GlowDispenser) teDispenser.getState();
    dispenser.dispense();
}
Also used : DispenserEntity(net.glowstone.block.entity.DispenserEntity) GlowDispenser(net.glowstone.block.state.GlowDispenser) BlockEntity(net.glowstone.block.entity.BlockEntity)

Aggregations

BlockEntity (net.glowstone.block.entity.BlockEntity)1 DispenserEntity (net.glowstone.block.entity.DispenserEntity)1 GlowDispenser (net.glowstone.block.state.GlowDispenser)1