use of cn.nukkit.block.BlockBrewingStand in project Nukkit by Nukkit.
the class BlockEntityBrewingStand method updateBlock.
public void updateBlock() {
Block block = this.getLevelBlock();
if (!(block instanceof BlockBrewingStand)) {
return;
}
int meta = 0;
for (int i = 1; i <= 3; ++i) {
Item potion = this.inventory.getItem(i);
if (potion.getId() == Item.POTION && potion.getCount() > 0) {
meta |= 1 << i;
}
}
block.setDamage(meta);
this.level.setBlock(block, block, false, false);
}
Aggregations