Class BlockHit

java.lang.Object
com.hypixel.hytale.server.npc.movement.controllers.BlockHit

public final class BlockHit extends Object
Snapshot of a block that the rail passed through due to RailStepConfig.ignoredBlockFilter.

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().

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Internal block type id (may be AssetMapWithIndexes.NOT_FOUND).
    int
     
    int
     
    int
     
    final org.joml.Vector3d
    Point on the block surface where the entity's swept box first touched it.
    final org.joml.Vector3d
    Block collision normal, pointing outward from the block toward the entity.
    double
    Scale along the requested delta in [0, 1].
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    assign(int blockX, int blockY, int blockZ, int blockTypeId, org.joml.Vector3dc collisionPoint, org.joml.Vector3dc normal, double t)
     

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • blockX

      public int blockX
    • blockY

      public int blockY
    • blockZ

      public int blockZ
    • blockTypeId

      public int blockTypeId
      Internal block type id (may be AssetMapWithIndexes.NOT_FOUND).
    • collisionPoint

      @Nonnull public final org.joml.Vector3d collisionPoint
      Point on the block surface where the entity's swept box first touched it.
    • normal

      @Nonnull public final org.joml.Vector3d normal
      Block collision normal, pointing outward from the block toward the entity.
    • t

      public double t
      Scale along the requested delta in [0, 1].
  • Constructor Details

    • BlockHit

      public BlockHit()
  • Method Details

    • assign

      public void assign(int blockX, int blockY, int blockZ, int blockTypeId, @Nonnull org.joml.Vector3dc collisionPoint, @Nonnull org.joml.Vector3dc normal, double t)