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

    • clearCancelReason

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

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

      Location getCurrentDestination()
      Gets the current movement destination
    • getPath

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

      Location getTargetAsLocation()
      Gets the target destination location
    • getTargetType

      TargetType getTargetType()
      The TargetType of this strategy
    • stop

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

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