Class CastCommandDataHolder
java.lang.Object
com.binaris.wizardry.capabilities.CastCommandDataHolder
- All Implemented Interfaces:
CastCommandData,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
public class CastCommandDataHolder
extends Object
implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, CastCommandData
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraftforge.common.capabilities.Capability<CastCommandDataHolder>static final net.minecraft.resources.ResourceLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyFrom(@NotNull CastCommandDataHolder old) voiddeserializeNBT(net.minecraft.nbt.CompoundTag tag) booleanReturns whether the player is currently casting a spell via the cast command.net.minecraft.nbt.CompoundTagvoidstartCastingContinuousSpell(Spell spell, SpellModifiers modifiers, int duration) Starts casting the given spell with the given modifiers.voidStops casting the current spell.voidsync()voidtick()Casts the current continuous spell, fires relevant events and updates the castCommandTick field.
-
Field Details
-
LOCATION
public static final net.minecraft.resources.ResourceLocation LOCATION -
INSTANCE
public static final net.minecraftforge.common.capabilities.Capability<CastCommandDataHolder> INSTANCE
-
-
Constructor Details
-
CastCommandDataHolder
public CastCommandDataHolder(net.minecraft.world.entity.player.Player player)
-
-
Method Details
-
sync
public void sync() -
startCastingContinuousSpell
Description copied from interface:CastCommandDataStarts casting the given spell with the given modifiers.- Specified by:
startCastingContinuousSpellin interfaceCastCommandData
-
stopCastingContinuousSpell
public void stopCastingContinuousSpell()Description copied from interface:CastCommandDataStops casting the current spell.- Specified by:
stopCastingContinuousSpellin interfaceCastCommandData
-
tick
public void tick()Description copied from interface:CastCommandDataCasts the current continuous spell, fires relevant events and updates the castCommandTick field.- Specified by:
tickin interfaceCastCommandData
-
isCommandCasting
public boolean isCommandCasting()Description copied from interface:CastCommandDataReturns whether the player is currently casting a spell via the cast command.- Specified by:
isCommandCastingin interfaceCastCommandData
-
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
-