Class LocationCastContext
java.lang.Object
com.binaris.wizardry.api.content.spell.internal.CastContext
com.binaris.wizardry.api.content.spell.internal.LocationCastContext
LocationCastContext - Casting Context from Fixed Location
Specialized context used when a spell is cast from a specific location in the world
without a living caster (entity). This is the only context where caster() always returns null.
This context gives access to the exact position and direction of the cast, as well as a duration for spells that require it (e.g., constructs). It is primarily used for spells cast by blocks or environmental effects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.core.Directionprotected intprotected net.minecraft.world.phys.Vec3Fields inherited from class com.binaris.wizardry.api.content.spell.internal.CastContext
caster, castingTicks, modifiers, world -
Constructor Summary
ConstructorsConstructorDescriptionLocationCastContext(net.minecraft.world.level.Level world, double x, double y, double z, net.minecraft.core.Direction direction, int castingTicks, int duration, SpellModifiers modifiers) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.entity.LivingEntitycaster()net.minecraft.core.Directionvoiddirection(net.minecraft.core.Direction direction) intduration()voidduration(int duration) net.minecraft.core.BlockPospos()net.minecraft.world.phys.Vec3vec3()voidvec3(net.minecraft.world.phys.Vec3 vec3) doublex()doubley()doublez()Methods inherited from class com.binaris.wizardry.api.content.spell.internal.CastContext
castingTicks, castingTicks, modifiers, modifiers, world
-
Field Details
-
vec3
protected net.minecraft.world.phys.Vec3 vec3 -
direction
protected net.minecraft.core.Direction direction -
duration
protected int duration
-
-
Constructor Details
-
LocationCastContext
public LocationCastContext(net.minecraft.world.level.Level world, double x, double y, double z, net.minecraft.core.Direction direction, int castingTicks, int duration, SpellModifiers modifiers)
-
-
Method Details
-
caster
public net.minecraft.world.entity.LivingEntity caster()- Overrides:
casterin classCastContext
-
vec3
public net.minecraft.world.phys.Vec3 vec3() -
pos
public net.minecraft.core.BlockPos pos() -
x
public double x() -
y
public double y() -
z
public double z() -
direction
public net.minecraft.core.Direction direction() -
duration
public int duration() -
vec3
public void vec3(net.minecraft.world.phys.Vec3 vec3) -
direction
public void direction(net.minecraft.core.Direction direction) -
duration
public void duration(int duration)
-