Search in sources :

Example 1 with ItemSkull

use of cn.nukkit.item.ItemSkull in project Nukkit by Nukkit.

the class BlockSkull method getDrops.

@Override
public Item[] getDrops(Item item) {
    BlockEntity blockEntity = getLevel().getBlockEntity(this);
    int dropMeta = 0;
    if (blockEntity != null)
        dropMeta = blockEntity.namedTag.getByte("SkullType");
    return new Item[] { new ItemSkull(dropMeta) };
}
Also used : Item(cn.nukkit.item.Item) BlockEntity(cn.nukkit.blockentity.BlockEntity) ItemSkull(cn.nukkit.item.ItemSkull)

Aggregations

BlockEntity (cn.nukkit.blockentity.BlockEntity)1 Item (cn.nukkit.item.Item)1 ItemSkull (cn.nukkit.item.ItemSkull)1