Interface IStoredSpellVar<T>
- Type Parameters:
T- the type of value this spell variable holds
- All Superinterfaces:
ISpellVar<T>
- All Known Implementing Classes:
IStoredSpellVar.StoredSpellVar
Extension of
ISpellVar that adds NBT serialization capabilities for persistent storage.
Stored spell variables can be serialized to and deserialized from NBT tags, allowing them to be saved to disk and persist across game sessions.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classIStoredSpellVar.StoredSpellVar<T,E extends net.minecraft.nbt.Tag> Default implementation ofIStoredSpellVarwith NBT serialization support.Nested classes/interfaces inherited from interface com.binaris.wizardry.api.content.data.ISpellVar
ISpellVar.SpellVar<T> -
Method Summary
-
Method Details
-
write
Writes the value to an NBT compound tag for persistent storage.- Parameters:
nbt- the NBT compound tag to write tovalue- the value to write
-
read
Reads the value from an NBT compound tag.- Parameters:
nbt- the NBT compound tag to read from- Returns:
- the value read from the tag, or null if no value is present
-