Record Class RouteFinder
java.lang.Object
java.lang.Record
com.soulfiremc.server.pathfinding.RouteFinder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA full route found to the targetstatic final recordNo route found to the targetstatic final recordThis is the best route we found before reaching the edge of view distancestatic interfaceThe result of a route searchstatic final recordThe search expired before finding a routestatic final recordThe search was interrupted before finding a route -
Constructor Summary
ConstructorsConstructorDescriptionRouteFinder(MinecraftGraph baseGraph, GoalScorer scorer) Creates an instance of aRouteFinderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebaseGraphrecord component.final booleanIndicates whether some other object is "equal to" this one.findRouteFuture(NodeState from) findRouteFutureSingle(MinecraftGraph graph, NodeState from, CancellationToken cancellationToken) final inthashCode()Returns a hash code value for this object.scorer()Returns the value of thescorerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RouteFinder
Creates an instance of aRouteFinderrecord class.- Parameters:
baseGraph- the value for thebaseGraphrecord componentscorer- the value for thescorerrecord component
-
-
Method Details
-
findRouteFuture
-
findRouteFutureSingle
public CompletableFuture<RouteFinder.RouteSearchResult> findRouteFutureSingle(MinecraftGraph graph, NodeState from, CancellationToken cancellationToken) -
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 withObjects::equals(Object,Object). -
baseGraph
Returns the value of thebaseGraphrecord component.- Returns:
- the value of the
baseGraphrecord component
-
scorer
Returns the value of thescorerrecord component.- Returns:
- the value of the
scorerrecord component
-