Interface PathStrategy

All Known Implementing Classes:
AbstractPathStrategy, AStarNavigationStrategy, FlyingAStarNavigationStrategy, MCNavigationStrategy, MCTargetStrategy, StraightLineNavigationStrategy

public interface PathStrategy
A pathfinding strategy directed at a target. Has two states: pathfinding -> cancelled represented by getCancelReason().
  • Method Details Link icon

    • clearCancelReason Link icon

      void clearCancelReason()
      Clears the CancelReason returned by getCancelReason() and attempts to resume pathfinding.
    • getCancelReason Link icon

      CancelReason getCancelReason()
      Returns:
      The reason for the pathfinding to stop, or null if it is still continuing.
    • getCurrentDestination Link icon

      Location getCurrentDestination()
      Returns:
      Gets the current movement destination
    • getPath Link icon

      Iterable<Vector> getPath()
      Returns:
      A copy of the current path, if any
    • getTargetAsLocation Link icon

      Location getTargetAsLocation()
      Returns:
      Gets the target destination location
    • getTargetType Link icon

      TargetType getTargetType()
      Returns:
      The TargetType of this strategy
    • stop Link icon

      void stop()
      Forcibly stops pathfinding. Note that this method does not necessarily set the cancel reason.
    • update Link icon

      boolean update()
      Updates and runs the pathfinding strategy on its current NPC and destination.
      Returns:
      Whether pathfinding has completed