Contents
Class EntityHit
java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.EntityHit
Snapshot of an entity hit during the rail step.
Instances are pooled by RailStepResult and reused across ticks. The contained vectors
are stable references owned by this instance; callers must copy them if they need to retain the
data past the next RailStepResult.reset().
No surface normal is reported; callers can use the rail step's translation direction as the
approximate contact direction and sourcePosition as the exact hit point on the target's
AABB.
-
Field Summary
FieldsModifier and TypeFieldDescriptionReference to the hit entity (player or NPC).booleantruewhen the hit entity is a player.final org.joml.Vector3dSource (charging) entity position at impact, i.e.doubleScale along the requested translation in [0, 1].final org.joml.Vector3dHit entity's transform position snapshotted at scan time. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassign(Ref<EntityStore> entity, boolean isPlayer, org.joml.Vector3dc sourcePosition, org.joml.Vector3dc targetPosition, double t)
-
Field Details
-
entity
Reference to the hit entity (player or NPC). -
isPlayer
public boolean isPlayertruewhen the hit entity is a player. -
sourcePosition
@Nonnull public final org.joml.Vector3d sourcePositionSource (charging) entity position at impact, i.e.pos + t * translation. -
targetPosition
@Nonnull public final org.joml.Vector3d targetPositionHit entity's transform position snapshotted at scan time. -
t
public double tScale along the requested translation in [0, 1].
-
-
Constructor Details
-
EntityHit
public EntityHit()
-
-
Method Details
-
assign
public void assign(@Nonnull Ref<EntityStore> entity, boolean isPlayer, @Nonnull org.joml.Vector3dc sourcePosition, @Nonnull org.joml.Vector3dc targetPosition, double t)
-