Package mindustry.ai

Class Pathfinder

java.lang.Object
mindustry.ai.Pathfinder
All Implemented Interfaces:
Runnable

public class Pathfinder extends Object implements Runnable
  • Field Details

  • Constructor Details

    • Pathfinder

      public Pathfinder()
  • Method Details

    • packTile

      public int packTile(Tile tile)
      Packs a tile into its internal representation.
    • get

      public int get(int x, int y)
    • updateTile

      public void updateTile(Tile tile)
      Update a tile in the internal pathfinding grid. Causes a complete pathfinding recalculation. Main thread only.
    • run

      public void run()
      Thread implementation.
      Specified by:
      run in interface Runnable
    • getField

      public Pathfinder.Flowfield getField(Team team, int costType, int fieldType)
    • getTargetTile

      @Nullable public Tile getTargetTile(Tile tile, Pathfinder.Flowfield path)
      Gets next tile to travel to. Main thread only.