public interface IPath
Modifier and Type | Method and Description |
---|---|
default IPath |
cutoffAtLoadedChunks(java.lang.Object bsi)
Cuts off this path at the loaded chunk border, and returns the resulting path.
|
default BetterBlockPos |
getDest()
Returns the end position of this path.
|
Goal |
getGoal() |
int |
getNumNodesConsidered()
Returns the number of nodes that were considered during calculation before
this path was found.
|
default BetterBlockPos |
getSrc()
Returns the start position of this path.
|
default int |
length()
Returns the number of positions in this path.
|
java.util.List<IMovement> |
movements()
Ordered list of movements to carry out.
|
java.util.List<BetterBlockPos> |
positions()
All positions along the way.
|
default IPath |
postProcess()
This path is actually going to be executed in the world.
|
default void |
sanityCheck()
Performs a series of checks to ensure that the assembly of the path went as expected.
|
default IPath |
staticCutoff(Goal destination)
Cuts off this path using the min length and cutoff factor settings, and returns the resulting path.
|
default double |
ticksRemainingFrom(int pathPosition)
Returns the estimated number of ticks to complete the path from the given node index.
|
java.util.List<IMovement> movements()
java.util.List<BetterBlockPos> positions()
default IPath postProcess()
default int length()
positions().size()
.int getNumNodesConsidered()
default BetterBlockPos getSrc()
List
that is returned by positions()
.default BetterBlockPos getDest()
List
that is returned by positions()
.default double ticksRemainingFrom(int pathPosition)
pathPosition
- The index of the node we're calculating fromdefault IPath cutoffAtLoadedChunks(java.lang.Object bsi)
The argument is supposed to be a BlockStateInterface LOL LOL LOL LOL LOL
bsi
- The block state lookup, highly curseddefault IPath staticCutoff(Goal destination)
destination
- The end goal of this pathSettings.pathCutoffMinimumLength
,
Settings.pathCutoffFactor
default void sanityCheck()