Class CastCommandDataHolder

java.lang.Object
com.binaris.wizardry.cca.player.CastCommandDataHolder
All Implemented Interfaces:
CastCommandData, dev.onyxstudios.cca.api.v3.component.Component, dev.onyxstudios.cca.api.v3.component.ComponentV3, dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent, dev.onyxstudios.cca.api.v3.component.sync.ComponentPacketWriter, dev.onyxstudios.cca.api.v3.component.sync.PlayerSyncPredicate

public class CastCommandDataHolder extends Object implements CastCommandData, dev.onyxstudios.cca.api.v3.component.ComponentV3, dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent
  • Constructor Summary

    Constructors
    Constructor
    Description
    CastCommandDataHolder(net.minecraft.world.entity.player.Player provider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns whether the player is currently casting a spell via the cast command.
    void
    readFromNbt(@NotNull net.minecraft.nbt.CompoundTag tag)
     
    void
    startCastingContinuousSpell(Spell spell, SpellModifiers modifiers, int duration)
    Starts casting the given spell with the given modifiers.
    void
    Stops casting the current spell.
    void
    Casts the current continuous spell, fires relevant events and updates the castCommandTick field.
    void
    writeToNbt(@NotNull net.minecraft.nbt.CompoundTag tag)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent

    applySyncPacket, shouldSyncWith, writeSyncPacket

    Methods inherited from interface dev.onyxstudios.cca.api.v3.component.Component

    equals
  • Constructor Details

    • CastCommandDataHolder

      public CastCommandDataHolder(net.minecraft.world.entity.player.Player provider)
  • Method Details

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

      public void readFromNbt(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag)
      Specified by:
      readFromNbt in interface dev.onyxstudios.cca.api.v3.component.Component
    • writeToNbt

      public void writeToNbt(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag)
      Specified by:
      writeToNbt in interface dev.onyxstudios.cca.api.v3.component.Component