use of cn.nukkit.item.ItemFlowerPot in project Nukkit by Nukkit.
the class BlockFlowerPot method getDrops.
@Override
public Item[] getDrops(Item item) {
boolean dropInside = false;
int insideID = 0;
int insideMeta = 0;
BlockEntity blockEntity = getLevel().getBlockEntity(this);
if (blockEntity instanceof BlockEntityFlowerPot) {
dropInside = true;
insideID = blockEntity.namedTag.getShort("item");
insideMeta = blockEntity.namedTag.getInt("data");
}
if (dropInside) {
return new Item[] { new ItemFlowerPot(), Item.get(insideID, insideMeta, 1) };
} else {
return new Item[] { new ItemFlowerPot() };
}
}
Aggregations