public interface NbtValued
Modifier and Type | Method and Description |
---|---|
default com.sk89q.worldedit.util.nbt.CompoundBinaryTag |
getNbt()
Get the object's NBT data (tile entity data).
|
default CompoundTag |
getNbtData()
Deprecated.
See
getNbt() |
default LazyReference<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> |
getNbtReference()
Get the object's NBT data (tile entity data).
|
default boolean |
hasNbtData()
Deprecated.
See
getNbt() |
default void |
setNbt(com.sk89q.worldedit.util.nbt.CompoundBinaryTag nbtData)
Set the object's NBT data (tile entity data).
|
default void |
setNbtData(CompoundTag nbtData)
Deprecated.
|
default void |
setNbtReference(LazyReference<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> nbtData)
Set the object's NBT data (tile entity data).
|
@Deprecated default boolean hasNbtData()
getNbt()
getNbtData()
must not return null if this method returns true.@Deprecated @Nullable default CompoundTag getNbtData()
getNbt()
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.
@Deprecated default void setNbtData(@Nullable CompoundTag nbtData)
setNbtReference(LazyReference)
nbtData
- NBT data, or null if no data@NonAbstractForCompatibility(delegateName="getNbtData", delegateParams={}) @Nullable default LazyReference<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> getNbtReference()
This only needs to be used if you don't want to immediately resolve the data.
Otherwise, you probably want getNbt()
.
NonAbstractForCompatibility
for details@Nullable default com.sk89q.worldedit.util.nbt.CompoundBinaryTag getNbt()
NonAbstractForCompatibility
for details@NonAbstractForCompatibility(delegateName="setNbtData", delegateParams=CompoundTag.class) default void setNbtReference(@Nullable LazyReference<com.sk89q.worldedit.util.nbt.CompoundBinaryTag> nbtData)
nbtData
- NBT data, or null if no dataNonAbstractForCompatibility
for detailsdefault void setNbt(@Nullable com.sk89q.worldedit.util.nbt.CompoundBinaryTag nbtData)
nbtData
- NBT data, or null if no data