Class RayBlockHitTest

java.lang.Object
com.hypixel.hytale.server.npc.util.RayBlockHitTest
All Implemented Interfaces:
BlockIterator.BlockIteratorProcedure

public class RayBlockHitTest extends Object implements BlockIterator.BlockIteratorProcedure
  • Field Details

  • Constructor Details

    • RayBlockHitTest

      public RayBlockHitTest()
  • Method Details

    • accept

      public boolean accept(int x, int y, int z, double px, double py, double pz, double qx, double qy, double qz)
      Description copied from interface: BlockIterator.BlockIteratorProcedure
      Called by the iteration process to deliver the next block on the ray. Returns FALSE if you with to end iteration before the iteration reaches maximum distance.
      Specified by:
      accept in interface BlockIterator.BlockIteratorProcedure
      Parameters:
      x - X-coordinate of the block
      y - Y-coordinate of the block
      z - Z-coordinate of the block
      px - Relative X-coordinate of entry-point (0 - 1)
      py - Relative Y-coordinate of entry-point (0 - 1)
      pz - Relative Z-coordinate of entry-point (0 - 1)
      qx - Relative X-coordinate of exit-point (0 - 1)
      qy - Relative Y-coordinate of exit-point (0 - 1)
      qz - Relative Z-coordinate of exit-point (0 - 1)
      Returns:
      TRUE if iteration should continue
    • getHitPosition

      @Nonnull public org.joml.Vector3d getHitPosition()
    • getLastBlockRevision

      public short getLastBlockRevision()
    • init

      public boolean init(@Nonnull Ref<EntityStore> ref, int blockSet, float pitch, @Nonnull ComponentAccessor<EntityStore> componentAccessor)
    • run

      public boolean run(double range)
    • clear

      public void clear()