Interface Pathfinder
public interface Pathfinder
A Pathfinder is a class that can find a path between two positions while following a given set of
rules.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
Aborts the running pathfinding process.findPath
(PathPosition start, PathPosition target) Tries to find a Path between the twoPathPosition
s.void
Registers aPathfinderHook
that will be called on every step of the pathfinding process.
-
Method Details
-
findPath
Tries to find a Path between the twoPathPosition
s.- Returns:
- An
CompletionStage
that will contain aPathfinderResult
.
-
abort
void abort()Aborts the running pathfinding process.In this context aborts means that the pathfinding process will be stopped and the result will be
PathState.ABORTED
. -
registerPathfindingHook
Registers aPathfinderHook
that will be called on every step of the pathfinding process. This can be used to modify the pathfinding process or to collect data.- Parameters:
hook
- The hook to register.
-