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 iterationsallowDoors- allow opening doorsallowShortcuts- allow agility shortcutsallowPlaneTransitions- allow stairs/laddersallowClimbovers- allow stiles/climbable obstaclesallowTransports- allow transport links (boats, carts, etc.)allowTeleports- allow teleport spells/itemsdoorCost- extra cost for door traversaltransitionCost- extra cost for plane transitionsshortcutCost- extra cost for agility shortcutsclimboverCost- extra cost for climboverstransportCost- extra cost for transport linksglobalTeleportMinHeuristic- min heuristic distance before teleports consideredheuristicWeight- 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();
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WorldPathConfigDefault config matching server defaults. -
Constructor Summary
ConstructorsConstructorDescriptionWorldPathConfig(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 aWorldPathConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theagilityLevelrecord component.booleanReturns the value of theallowClimboversrecord component.booleanReturns the value of theallowDoorsrecord component.booleanReturns the value of theallowPlaneTransitionsrecord component.booleanReturns the value of theallowShortcutsrecord component.booleanReturns the value of theallowTeleportsrecord component.booleanReturns the value of theallowTransportsrecord component.static WorldPathConfig.Builderbuilder()floatReturns the value of theclimboverCostrecord component.floatdoorCost()Returns the value of thedoorCostrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of theglobalTeleportMinHeuristicrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of theheuristicWeightrecord component.intReturns the value of themaxIterationsrecord component.floatReturns the value of theshortcutCostrecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thetransitionCostrecord component.floatReturns the value of thetransportCostrecord component.
-
Field Details
-
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 aWorldPathConfigrecord class.- Parameters:
agilityLevel- the value for theagilityLevelrecord componentmaxIterations- the value for themaxIterationsrecord componentallowDoors- the value for theallowDoorsrecord componentallowShortcuts- the value for theallowShortcutsrecord componentallowPlaneTransitions- the value for theallowPlaneTransitionsrecord componentallowClimbovers- the value for theallowClimboversrecord componentallowTransports- the value for theallowTransportsrecord componentallowTeleports- the value for theallowTeleportsrecord componentdoorCost- the value for thedoorCostrecord componenttransitionCost- the value for thetransitionCostrecord componentshortcutCost- the value for theshortcutCostrecord componentclimboverCost- the value for theclimboverCostrecord componenttransportCost- the value for thetransportCostrecord componentglobalTeleportMinHeuristic- the value for theglobalTeleportMinHeuristicrecord componentheuristicWeight- the value for theheuristicWeightrecord component
-
-
Method Details
-
builder
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
agilityLevel
public int agilityLevel()Returns the value of theagilityLevelrecord component.- Returns:
- the value of the
agilityLevelrecord component
-
maxIterations
public int maxIterations()Returns the value of themaxIterationsrecord component.- Returns:
- the value of the
maxIterationsrecord component
-
allowDoors
public boolean allowDoors()Returns the value of theallowDoorsrecord component.- Returns:
- the value of the
allowDoorsrecord component
-
allowShortcuts
public boolean allowShortcuts()Returns the value of theallowShortcutsrecord component.- Returns:
- the value of the
allowShortcutsrecord component
-
allowPlaneTransitions
public boolean allowPlaneTransitions()Returns the value of theallowPlaneTransitionsrecord component.- Returns:
- the value of the
allowPlaneTransitionsrecord component
-
allowClimbovers
public boolean allowClimbovers()Returns the value of theallowClimboversrecord component.- Returns:
- the value of the
allowClimboversrecord component
-
allowTransports
public boolean allowTransports()Returns the value of theallowTransportsrecord component.- Returns:
- the value of the
allowTransportsrecord component
-
allowTeleports
public boolean allowTeleports()Returns the value of theallowTeleportsrecord component.- Returns:
- the value of the
allowTeleportsrecord component
-
doorCost
-
transitionCost
public float transitionCost()Returns the value of thetransitionCostrecord component.- Returns:
- the value of the
transitionCostrecord component
-
shortcutCost
public float shortcutCost()Returns the value of theshortcutCostrecord component.- Returns:
- the value of the
shortcutCostrecord component
-
climboverCost
public float climboverCost()Returns the value of theclimboverCostrecord component.- Returns:
- the value of the
climboverCostrecord component
-
transportCost
public float transportCost()Returns the value of thetransportCostrecord component.- Returns:
- the value of the
transportCostrecord component
-
globalTeleportMinHeuristic
public float globalTeleportMinHeuristic()Returns the value of theglobalTeleportMinHeuristicrecord component.- Returns:
- the value of the
globalTeleportMinHeuristicrecord component
-
heuristicWeight
public float heuristicWeight()Returns the value of theheuristicWeightrecord component.- Returns:
- the value of the
heuristicWeightrecord component
-