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
  • 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

      public void startCastingContinuousSpell(Spell spell, SpellModifiers modifiers, int duration)
      Description copied from interface: CastCommandData
      Starts casting the given spell with the given modifiers.
      Specified by:
      startCastingContinuousSpell in interface CastCommandData
    • stopCastingContinuousSpell

      public void stopCastingContinuousSpell()
      Description copied from interface: CastCommandData
      Stops casting the current spell.
      Specified by:
      stopCastingContinuousSpell in interface CastCommandData
    • tick

      public void tick()
      Description copied from interface: CastCommandData
      Casts the current continuous spell, fires relevant events and updates the castCommandTick field.
      Specified by:
      tick in interface CastCommandData
    • isCommandCasting

      public boolean isCommandCasting()
      Description copied from interface: CastCommandData
      Returns whether the player is currently casting a spell via the cast command.
      Specified by:
      isCommandCasting in interface CastCommandData
    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT()
      Specified by:
      serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.nbt.CompoundTag tag)
      Specified by:
      deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • copyFrom

      public void copyFrom(@NotNull @NotNull CastCommandDataHolder old)