T
- The type of the data this delegate can forward the operations to.public interface NBTIODelegate<T>
Modifier and Type | Method and Description |
---|---|
void |
append(T item,
NBTCompoundTag tag)
Add all of the mappings in the tag to the item.
|
NBTCompoundTag |
read(T item)
Read the NBT data from the
item . |
void |
write(T item,
NBTCompoundTag tag)
Write the given tag to the item.
|
NBTCompoundTag read(T item)
item
.item
- the item who's data is being readNBTCompoundTag
with the item's NBT datavoid write(T item, NBTCompoundTag tag)
append(Object, NBTCompoundTag)
if you
would only like to add new tags or overwrite just the tags in the compound.item
- the item that the data is being written totag
- the data to write to the itemvoid append(T item, NBTCompoundTag tag)
item
- the item that the data is being written totag
- the data to append to the item