Class AStarNode

java.lang.Object
com.hypixel.hytale.server.npc.navigation.AStarNode
All Implemented Interfaces:
IWaypoint

public class AStarNode extends Object implements IWaypoint
Since:
2018-05-03
  • Field Details

    • ENTRY_NODE_TAG

      public static final AStarNode ENTRY_NODE_TAG
  • Constructor Details

    • AStarNode

      public AStarNode(int numDirections)
  • Method Details

    • getPositionIndex

      public long getPositionIndex()
    • getSuccessors

      @Nonnull public AStarNode[] getSuccessors()
    • getSuccessor

      public AStarNode getSuccessor(int index)
    • setSuccessor

      public void setSuccessor(int directionIndex, @Nonnull AStarNode node, int inverseDirectionIndex, float cost)
    • getPredecessor

      @Nullable public AStarNode getPredecessor()
    • getNextPathNode

      public AStarNode getNextPathNode()
    • setNextNode

      public void setNextNode(AStarNode next, int length)
    • getTravelCost

      public float getTravelCost()
    • getEstimateToGoal

      public float getEstimateToGoal()
    • getTotalCost

      public float getTotalCost()
    • getPredecessorDirection

      public int getPredecessorDirection()
    • close

      public void close()
    • isOpen

      public boolean isOpen()
    • isInvalid

      public boolean isInvalid()
    • getLength

      public int getLength()
      Specified by:
      getLength in interface IWaypoint
    • next

      public AStarNode next()
      Specified by:
      next in interface IWaypoint
    • getPosition

      @Nonnull public org.joml.Vector3d getPosition()
      Specified by:
      getPosition in interface IWaypoint
    • advance

      @Nullable public AStarNode advance(int skip)
      Specified by:
      advance in interface IWaypoint
    • initAsStartNode

      @Nonnull public AStarNode initAsStartNode(@Nonnull org.joml.Vector3d position, long positionIndex, float cost, float estimateCost)
    • initWithPredecessor

      @Nonnull public AStarNode initWithPredecessor(@Nonnull AStarNode predecessor, int directionIndex, @Nonnull org.joml.Vector3d position, long positionIndex, int inverseDirectionIndex, float travelCost, float estimateCost)
    • initAsInvalid

      @Nonnull public AStarNode initAsInvalid(@Nonnull org.joml.Vector3d position, long positionIndex)
    • adjustOptimalPath

      public void adjustOptimalPath(AStarNode parentNode, float deltaCost, int direction)
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object