Class PlayerCastContext
java.lang.Object
com.binaris.wizardry.api.content.spell.internal.CastContext
com.binaris.wizardry.api.content.spell.internal.PlayerCastContext
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.
-
Field Summary
Fields inherited from class com.binaris.wizardry.api.content.spell.internal.CastContext
caster, castingTicks, modifiers, world -
Constructor Summary
ConstructorsConstructorDescriptionPlayerCastContext(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player caster, net.minecraft.world.InteractionHand hand, int castingTicks, SpellModifiers modifiers) -
Method Summary
Methods inherited from class com.binaris.wizardry.api.content.spell.internal.CastContext
castingTicks, castingTicks, modifiers, modifiers, world
-
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:
casterin classCastContext
-
hand
public net.minecraft.world.InteractionHand hand()
-