Interface Navigator


public interface Navigator
Drives a mob towards a block.
Since:
0.1.0
  • 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, BlockPos 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
    • moveTo

      default void moveTo(Location from, Location goal)
      Parameters:
      from - the position the path starts from
      goal - the location to walk to, rounded down to a block
      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 BlockPos currentWaypoint()
      Returns:
      the block the mob is currently walking to, or null when idle
      Since:
      0.1.0