![JAR search and dependency download from the Maven repository](/logo.png)
cn.nukkit.blockentity.BlockEntityDispenser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powernukkit Show documentation
Show all versions of powernukkit Show documentation
A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.
package cn.nukkit.blockentity;
import cn.nukkit.api.PowerNukkitDifference;
import cn.nukkit.block.BlockID;
import cn.nukkit.inventory.DispenserInventory;
import cn.nukkit.level.format.FullChunk;
import cn.nukkit.nbt.tag.CompoundTag;
@PowerNukkitDifference(info = "Extends BlockEntityEjectable instead of " +
"BlockEntitySpawnable, BlockEntityContainer, BlockEntityNameable, and InventoryHolder " +
"only in PowerNukkit", since = "1.4.0.0-PN")
public class BlockEntityDispenser extends BlockEntityEjectable {
protected DispenserInventory inventory;
public BlockEntityDispenser(FullChunk chunk, CompoundTag nbt) {
super(chunk, nbt);
}
@Override
protected DispenserInventory createInventory() {
return inventory = new DispenserInventory(this);
}
@Override
protected String getBlockEntityName() {
return BlockEntity.DISPENSER;
}
@Override
public DispenserInventory getInventory() {
return inventory;
}
@Override
public boolean isBlockEntityValid() {
return this.getLevelBlock().getId() == BlockID.DISPENSER;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy