public class DispenserBlock extends ContainerBlock
Constructor and Description |
---|
DispenserBlock()
Construct an empty dispenser block.
|
DispenserBlock(int data)
Construct an empty dispenser block.
|
DispenserBlock(int data,
BaseItemStack[] items)
Construct a dispenser block with the given orientation and inventory.
|
Modifier and Type | Method and Description |
---|---|
CompoundTag |
getNbtData()
Get the object's NBT data (tile entity data).
|
java.lang.String |
getNbtId()
Return the name of the title entity ID.
|
void |
setNbtData(CompoundTag rootTag)
Set the object's NBT data (tile entity data).
|
deserializeInventory, deserializeItem, getItems, hasNbtData, serializeInventory, serializeItem, setItems
containsFuzzy, cycleData, equals, equalsFuzzy, flip, flip, getData, getId, getType, hashCode, hasWildcardData, inIterable, internalSetData, internalSetId, isAir, rotate90, rotate90Reverse, setData, setId, setIdAndData, setType, toString
public DispenserBlock()
public DispenserBlock(int data)
data
- data value (orientation)public DispenserBlock(int data, BaseItemStack[] items)
data
- data value (orientation)items
- array of items in the inventorypublic java.lang.String getNbtId()
TileEntityBlock
getNbtId
in interface TileEntityBlock
getNbtId
in class BaseBlock
public CompoundTag getNbtData()
NbtValued
NbtValued.setNbtData(CompoundTag)
so that the instance knows of the changes. Making changes without
calling NbtValued.setNbtData(CompoundTag)
could have unintended
consequences.
NbtValued.hasNbtData()
must return true if and only if method does
not return null.
getNbtData
in interface NbtValued
getNbtData
in class BaseBlock
public void setNbtData(CompoundTag rootTag)
NbtValued
setNbtData
in interface NbtValued
setNbtData
in class BaseBlock
rootTag
- NBT data, or null if no data