Class PlayerCastContext

java.lang.Object
com.binaris.wizardry.api.content.spell.internal.CastContext
com.binaris.wizardry.api.content.spell.internal.PlayerCastContext

public class PlayerCastContext extends CastContext
PlayerCastContext - Casting Context for Players

Specialized context used when a player casts a spell through casting items such as wands (WandItem) or scrolls (ScrollItem).

In addition to the base data from CastContext, this context let you know which hand made the cast, (normally main hand, but could be offhand) and provides access to the Player caster.

See Also:
  • Constructor Details

    • PlayerCastContext

      public PlayerCastContext(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player caster, net.minecraft.world.InteractionHand hand, int castingTicks, SpellModifiers modifiers)
  • Method Details

    • caster

      public net.minecraft.world.entity.player.Player caster()
      Overrides:
      caster in class CastContext
    • hand

      public net.minecraft.world.InteractionHand hand()