Class EntityCastContext
java.lang.Object
com.binaris.wizardry.api.content.spell.internal.CastContext
com.binaris.wizardry.api.content.spell.internal.EntityCastContext
EntityCastContext - Casting Context for Entities
Specialized context used when a non-player entity (NPC, mob, minion) casts a spell. This context is essential for spells that can be used by both players and hostile or allied entities.
It provides information about the casting entity, the hand used for casting, and an optional target entity.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.world.InteractionHandprotected @Nullable net.minecraft.world.entity.LivingEntityFields inherited from class com.binaris.wizardry.api.content.spell.internal.CastContext
caster, castingTicks, modifiers, world -
Constructor Summary
ConstructorsConstructorDescriptionEntityCastContext(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity caster, net.minecraft.world.InteractionHand hand, int castingTicks, @Nullable net.minecraft.world.entity.LivingEntity target, SpellModifiers modifiers) -
Method Summary
Methods inherited from class com.binaris.wizardry.api.content.spell.internal.CastContext
caster, castingTicks, castingTicks, modifiers, modifiers, world
-
Field Details
-
hand
protected net.minecraft.world.InteractionHand hand -
target
@Nullable protected @Nullable net.minecraft.world.entity.LivingEntity target
-
-
Constructor Details
-
EntityCastContext
public EntityCastContext(net.minecraft.world.level.Level world, net.minecraft.world.entity.LivingEntity caster, net.minecraft.world.InteractionHand hand, int castingTicks, @Nullable @Nullable net.minecraft.world.entity.LivingEntity target, SpellModifiers modifiers)
-
-
Method Details
-
hand
public net.minecraft.world.InteractionHand hand() -
target
@Nullable public @Nullable net.minecraft.world.entity.LivingEntity target() -
hand
public void hand(net.minecraft.world.InteractionHand hand) -
target
public void target(@Nullable @Nullable net.minecraft.world.entity.LivingEntity target)
-