Interface PathfinderResult
public interface PathfinderResult
-
Method Summary
Modifier and TypeMethodDescription@NonNull Path
getPath()
Returns the foundPath
regardless if successful or not.@NonNull PathState
Returns the state of the pathfinding.boolean
Whether the pathfinder has failed to reach its target.boolean
Whether a pathfinder has resulted in a fallback.boolean
Returns whether the pathfinding was successful.
-
Method Details
-
successful
boolean successful()Returns whether the pathfinding was successful.- Returns:
- true if the pathfinding was successful
-
hasFailed
boolean hasFailed()Whether the pathfinder has failed to reach its target. This includesPathState.FAILED
,PathState.LENGTH_LIMITED
,PathState.MAX_ITERATIONS_REACHED
andPathState.FALLBACK
- Returns:
- Whether the pathfinder has failed to reach its target
-
hasFallenBack
boolean hasFallenBack()Whether a pathfinder has resulted in a fallback.- Returns:
- Whether a pathfinder has resulted in a fallback
-
getPathState
Returns the state of the pathfinding.- Returns:
- The
PathState
-
getPath
Returns the foundPath
regardless if successful or not. The path is empty if the pathfinding failed.- Returns:
- The found
Path
-