public interface NbtValued
Modifier and Type | Method and Description |
---|---|
CompoundTag |
getNbtData()
Get the object's NBT data (tile entity data).
|
boolean |
hasNbtData()
Returns whether the block contains NBT data.
|
void |
setNbtData(CompoundTag nbtData)
Set the object's NBT data (tile entity data).
|
boolean hasNbtData()
getNbtData()
must not return null if this method returns true.@Nullable CompoundTag getNbtData()
setNbtData(CompoundTag)
so that the instance knows of the changes. Making changes without
calling setNbtData(CompoundTag)
could have unintended
consequences.
hasNbtData()
must return true if and only if method does
not return null.
void setNbtData(@Nullable CompoundTag nbtData)
nbtData
- NBT data, or null if no data