java.lang.Object
com.binaris.wizardry.api.content.spell.Spell
Direct Known Subclasses:
AreaEffectSpell, ArrowSpell, BetterFlight, Blink, BlockWithSurprise, BuffSpell, Charge, ConjureItemSpell, ConstructSpell, DragonFireball, Evade, Fangs, FlamingWeapon, Flight, FrostBarrier, GrowthAura, ImbueWeapon, InvokeWeather, Leap, Levitation, LightningPulse, MinionSpell, NoneSpell, PhaseStep, PocketFurnace, PocketWorkbench, ProjectileSpell, RaySpell, ShulkerBullet, SpeedTime, VanishingBox, WitherSkullSpell

public abstract class Spell extends Object
  • Field Details

    • volume

      protected float volume
    • pitch

      protected float pitch
    • pitchVariation

      protected float pitchVariation
  • Constructor Details

    • Spell

      public Spell()
  • Method Details

    • cast

      public abstract boolean cast(PlayerCastContext ctx)
    • cast

      public boolean cast(EntityCastContext ctx)
    • cast

      public boolean cast(LocationCastContext ctx)
    • endCast

      public void endCast(CastContext cxt)
    • onCharge

      @Deprecated public void onCharge(CastContext ctx)
      Deprecated.
    • isInstantCast

      public boolean isInstantCast()
    • canCastByEntity

      public boolean canCastByEntity()
    • canCastByLocation

      public boolean canCastByLocation()
    • requiresPacket

      public boolean requiresPacket()
    • getDescriptionFormatted

      public net.minecraft.network.chat.Component getDescriptionFormatted()
    • getOrCreateDescriptionId

      protected String getOrCreateDescriptionId()
    • getDescriptionId

      public String getDescriptionId()
    • getOrCreateLocation

      protected net.minecraft.resources.ResourceLocation getOrCreateLocation()
    • getLocation

      public net.minecraft.resources.ResourceLocation getLocation()
    • getDesc

      public net.minecraft.network.chat.Component getDesc()
    • getIcon

      public net.minecraft.resources.ResourceLocation getIcon()
    • getProperties

      public final SpellProperties getProperties()
    • properties

      @NotNull protected abstract @NotNull SpellProperties properties()
    • assignProperties

      public final Spell assignProperties(SpellProperties properties)
    • property

      public final <T> T property(SpellProperty<T> property)
    • getChargeUp

      public int getChargeUp()
    • getType

      public SpellType getType()
    • getAction

      public SpellAction getAction()
    • getElement

      public Element getElement()
    • getTier

      public SpellTier getTier()
    • getCost

      public int getCost()
    • getCooldown

      public int getCooldown()
    • isEnabled

      public boolean isEnabled(SpellContext context)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • soundValues

      public Spell soundValues(float volume, float pitch, float pitchVariation)
    • getVolume

      public float getVolume()
    • getPitch

      public float getPitch()
    • getPitchVariation

      public float getPitchVariation()
    • playSound

      protected void playSound(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int castTicks, int duration)
    • playSound

      protected void playSound(net.minecraft.world.level.Level world, net.minecraft.world.phys.Vec3 pos, int castTicks, int duration)
    • playSound

      protected void playSound(net.minecraft.world.level.Level world, double x, double y, double z, int ticksInUse, int duration)
    • playSoundLoop

      protected final void playSoundLoop(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity entity, int ticksInUse)
    • playSoundLoop

      protected final void playSoundLoop(net.minecraft.world.level.Level world, double x, double y, double z, int ticksInUse, int duration)
    • getLoopSounds

      protected net.minecraft.sounds.SoundEvent[] getLoopSounds()