Interface Pathfinder
- All Known Implementing Classes:
AbstractPathfinder,AStarPathfinder
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 TypeMethodDescriptiondefault PathfindingSearchfindPath(PathPosition start, PathPosition target) Tries to find a Path between the twoPathPositions.findPath(PathPosition start, PathPosition target, EnvironmentContext context) Tries to find a path between the specified start and target positions within the provided environment context.voidDeprecated.
-
Method Details
-
findPath
Tries to find a Path between the twoPathPositions.- Returns:
- A
PathfindingSearchinstance that can be used to configure and retrieve the result of the pathfinding operation.
-
findPath
Tries to find a path between the specified start and target positions within the provided environment context.- Parameters:
start- The starting position for pathfinding.target- The target position for pathfinding.context- The environment context that provides additional information for the pathfinding operation. This parameter can be null if no specific context is required.- Returns:
- A
PathfindingSearchinstance that can be used to configure and retrieve the result of the pathfinding operation.
-
registerPathfindingHook
Deprecated.UsePathfinderConfiguration.PathfinderConfigurationBuilder.pathfindingHooks(java.util.List)to configure hooks in thePathfinderConfigurationinstead.Registers aPathfinderHookthat 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.
-
PathfinderConfiguration.PathfinderConfigurationBuilder.pathfindingHooks(java.util.List)to configure hooks in thePathfinderConfigurationinstead.