Record Class WorldPathConfig

java.lang.Object
java.lang.Record
com.botwithus.bot.api.model.WorldPathConfig
Record Components:
agilityLevel - player agility level (≤1 = auto-read from stats)
maxIterations - max pathfinder iterations
allowDoors - allow opening doors
allowShortcuts - allow agility shortcuts
allowPlaneTransitions - allow stairs/ladders
allowClimbovers - allow stiles/climbable obstacles
allowTransports - allow transport links (boats, carts, etc.)
allowTeleports - allow teleport spells/items
doorCost - extra cost for door traversal
transitionCost - extra cost for plane transitions
shortcutCost - extra cost for agility shortcuts
climboverCost - extra cost for climbovers
transportCost - extra cost for transport links
globalTeleportMinHeuristic - min heuristic distance before teleports considered
heuristicWeight - A* heuristic weight multiplier

public record WorldPathConfig(int agilityLevel, int maxIterations, boolean allowDoors, boolean allowShortcuts, boolean allowPlaneTransitions, boolean allowClimbovers, boolean allowTransports, boolean allowTeleports, float doorCost, float transitionCost, float shortcutCost, float climboverCost, float transportCost, float globalTeleportMinHeuristic, float heuristicWeight) extends Record
Configuration for world-scale pathfinding. All fields use defaults matching the pathfinder's own; only override what you need.

Use the WorldPathConfig.Builder for convenient construction:

var config = WorldPathConfig.builder()
        .allowTeleports(false)
        .allowShortcuts(true)
        .build();
  • Field Details

    • DEFAULT

      public static final WorldPathConfig DEFAULT
      Default config matching server defaults.
  • Constructor Details

    • WorldPathConfig

      public WorldPathConfig(int agilityLevel, int maxIterations, boolean allowDoors, boolean allowShortcuts, boolean allowPlaneTransitions, boolean allowClimbovers, boolean allowTransports, boolean allowTeleports, float doorCost, float transitionCost, float shortcutCost, float climboverCost, float transportCost, float globalTeleportMinHeuristic, float heuristicWeight)
      Creates an instance of a WorldPathConfig record class.
      Parameters:
      agilityLevel - the value for the agilityLevel record component
      maxIterations - the value for the maxIterations record component
      allowDoors - the value for the allowDoors record component
      allowShortcuts - the value for the allowShortcuts record component
      allowPlaneTransitions - the value for the allowPlaneTransitions record component
      allowClimbovers - the value for the allowClimbovers record component
      allowTransports - the value for the allowTransports record component
      allowTeleports - the value for the allowTeleports record component
      doorCost - the value for the doorCost record component
      transitionCost - the value for the transitionCost record component
      shortcutCost - the value for the shortcutCost record component
      climboverCost - the value for the climboverCost record component
      transportCost - the value for the transportCost record component
      globalTeleportMinHeuristic - the value for the globalTeleportMinHeuristic record component
      heuristicWeight - the value for the heuristicWeight record component
  • Method Details

    • builder

      public static WorldPathConfig.Builder builder()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • agilityLevel

      public int agilityLevel()
      Returns the value of the agilityLevel record component.
      Returns:
      the value of the agilityLevel record component
    • maxIterations

      public int maxIterations()
      Returns the value of the maxIterations record component.
      Returns:
      the value of the maxIterations record component
    • allowDoors

      public boolean allowDoors()
      Returns the value of the allowDoors record component.
      Returns:
      the value of the allowDoors record component
    • allowShortcuts

      public boolean allowShortcuts()
      Returns the value of the allowShortcuts record component.
      Returns:
      the value of the allowShortcuts record component
    • allowPlaneTransitions

      public boolean allowPlaneTransitions()
      Returns the value of the allowPlaneTransitions record component.
      Returns:
      the value of the allowPlaneTransitions record component
    • allowClimbovers

      public boolean allowClimbovers()
      Returns the value of the allowClimbovers record component.
      Returns:
      the value of the allowClimbovers record component
    • allowTransports

      public boolean allowTransports()
      Returns the value of the allowTransports record component.
      Returns:
      the value of the allowTransports record component
    • allowTeleports

      public boolean allowTeleports()
      Returns the value of the allowTeleports record component.
      Returns:
      the value of the allowTeleports record component
    • doorCost

      public float doorCost()
      Returns the value of the doorCost record component.
      Returns:
      the value of the doorCost record component
    • transitionCost

      public float transitionCost()
      Returns the value of the transitionCost record component.
      Returns:
      the value of the transitionCost record component
    • shortcutCost

      public float shortcutCost()
      Returns the value of the shortcutCost record component.
      Returns:
      the value of the shortcutCost record component
    • climboverCost

      public float climboverCost()
      Returns the value of the climboverCost record component.
      Returns:
      the value of the climboverCost record component
    • transportCost

      public float transportCost()
      Returns the value of the transportCost record component.
      Returns:
      the value of the transportCost record component
    • globalTeleportMinHeuristic

      public float globalTeleportMinHeuristic()
      Returns the value of the globalTeleportMinHeuristic record component.
      Returns:
      the value of the globalTeleportMinHeuristic record component
    • heuristicWeight

      public float heuristicWeight()
      Returns the value of the heuristicWeight record component.
      Returns:
      the value of the heuristicWeight record component