public static interface Capability.IStorage<T>
Modifier and Type | Method and Description |
---|---|
void |
readNBT(Capability<T> capability,
T instance,
EnumFacing side,
NBTBase nbt)
Read the capability instance from a NBT tag.
|
NBTBase |
writeNBT(Capability<T> capability,
T instance,
EnumFacing side)
Serialize the capability instance to a NBTTag.
|
@Nullable NBTBase writeNBT(Capability<T> capability, T instance, EnumFacing side)
capability
- The Capability being stored.instance
- An instance of that capabilities interface.side
- The side of the object the instance is associated with.void readNBT(Capability<T> capability, T instance, EnumFacing side, NBTBase nbt)
capability
- The Capability being stored.instance
- An instance of that capabilities interface.side
- The side of the object the instance is associated with.nbt
- A NBT holding the data. Must not be null, as doesn't make sense to call this function with nothing to read...