Interface Navigator


public interface Navigator
Drives a mob towards a block.
Since:
0.1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Navigator
    A navigator that goes nowhere, used by mobs without pathfinding.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    void
    moveTo(Location from, Position goal)
     
    void
    Drops the current path; the mob stops where it stands.
  • Field Details

    • NONE

      static final Navigator NONE
      A navigator that goes nowhere, used by mobs without pathfinding.
      Since:
      0.1.0
  • Method Details

    • moveTo

      void moveTo(Location from, Position goal)
      Parameters:
      from - the position the path starts from, usually the mob's own location
      goal - the block to walk to
      Since:
      0.1.0
    • stop

      void stop()
      Drops the current path; the mob stops where it stands.
      Since:
      0.1.0
    • isNavigating

      boolean isNavigating()
      Returns:
      true while a path is being followed or computed
      Since:
      0.1.0
    • currentWaypoint

      @Nullable Position currentWaypoint()
      Returns:
      the block the mob is currently walking to, or null when idle
      Since:
      0.1.0