Class SpellManagerDataHolder
java.lang.Object
com.binaris.wizardry.capabilities.SpellManagerDataHolder
- All Implemented Interfaces:
SpellManagerData,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class SpellManagerDataHolder
extends Object
implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, SpellManagerData
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraftforge.common.capabilities.Capability<SpellManagerDataHolder>static final net.minecraft.resources.ResourceLocationstatic final Set<IStoredSpellVar> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(@NotNull SpellManagerDataHolder old) voiddeserializeNBT(net.minecraft.nbt.CompoundTag tag) booleandiscoverSpell(Spell spell) <T> TgetVariable(ISpellVar<T> var) booleanhasSpellBeenDiscovered(Spell spell) net.minecraft.nbt.CompoundTag<T> voidsetVariable(ISpellVar<? super T> variable, T value) voidsync()booleanundiscoverSpell(Spell spell)
-
Field Details
-
LOCATION
public static final net.minecraft.resources.ResourceLocation LOCATION -
INSTANCE
public static final net.minecraftforge.common.capabilities.Capability<SpellManagerDataHolder> INSTANCE -
storedVariables
-
spellData
-
spellsDiscovered
-
-
Constructor Details
-
SpellManagerDataHolder
public SpellManagerDataHolder(net.minecraft.world.entity.player.Player player)
-
-
Method Details
-
sync
public void sync()- Specified by:
syncin interfaceSpellManagerData
-
getVariable
- Specified by:
getVariablein interfaceSpellManagerData
-
setVariable
- Specified by:
setVariablein interfaceSpellManagerData
-
getSpellData
- Specified by:
getSpellDatain interfaceSpellManagerData
-
hasSpellBeenDiscovered
- Specified by:
hasSpellBeenDiscoveredin interfaceSpellManagerData
-
discoverSpell
- Specified by:
discoverSpellin interfaceSpellManagerData
-
undiscoverSpell
- Specified by:
undiscoverSpellin interfaceSpellManagerData
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT()- Specified by:
serializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
deserializeNBT
public void deserializeNBT(net.minecraft.nbt.CompoundTag tag) - Specified by:
deserializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
copyFrom
-