cn.nukkit.blockentity.BlockEntityDispenser Maven / Gradle / Ivy
package cn.nukkit.blockentity;
import cn.nukkit.api.PowerNukkitOnly;
import cn.nukkit.block.BlockID;
import cn.nukkit.inventory.DispenserInventory;
import cn.nukkit.level.format.FullChunk;
import cn.nukkit.nbt.tag.CompoundTag;
@PowerNukkitOnly
public class BlockEntityDispenser extends BlockEntityEjectable {
@PowerNukkitOnly
public BlockEntityDispenser(FullChunk chunk, CompoundTag nbt) {
super(chunk, nbt);
}
@PowerNukkitOnly
@Override
protected DispenserInventory createInventory() {
inventory = new DispenserInventory(this);
return getInventory();
}
@PowerNukkitOnly
@Override
protected String getBlockEntityName() {
return BlockEntity.DISPENSER;
}
@Override
public DispenserInventory getInventory() {
return (DispenserInventory) inventory;
}
@Override
public boolean isBlockEntityValid() {
return this.getLevelBlock().getId() == BlockID.DISPENSER;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy