Package baritone.api.pathing.calc
Interface IPath
public interface IPath
- Author:
- leijurv, Brady
-
Method Summary
Modifier and TypeMethodDescriptiondefault IPathCuts off this path at the loaded chunk border, and returns the resulting path.default BetterBlockPosgetDest()Returns the end position of this path.getGoal()intReturns the number of nodes that were considered during calculation before this path was found.default BetterBlockPosgetSrc()Returns the start position of this path.default intlength()Returns the number of positions in this path.Ordered list of movements to carry out.All positions along the way.default IPathThis path is actually going to be executed in the world.default voidPerforms a series of checks to ensure that the assembly of the path went as expected.default IPathstaticCutoff(Goal destination) Cuts off this path using the min length and cutoff factor settings, and returns the resulting path.default doubleticksRemainingFrom(int pathPosition) Returns the estimated number of ticks to complete the path from the given node index.
-
Method Details
-
movements
Ordered list of movements to carry out. movements.get(i).getSrc() should equal positions.get(i) movements.get(i).getDest() should equal positions.get(i+1) movements.size() should equal positions.size()-1- Returns:
- All of the movements to carry out
-
positions
All positions along the way. Should begin with the same as getSrc and end with the same as getDest- Returns:
- All of the positions along this path
-
postProcess
This path is actually going to be executed in the world. Do whatever additional processing is required. (as opposed to Path objects that are just constructed every frame for rendering)- Returns:
- The result of path post processing
-
length
Returns the number of positions in this path. Equivalent topositions().size().- Returns:
- Number of positions in this path
-
getGoal
- Returns:
- The goal that this path was calculated towards
-
getNumNodesConsidered
int getNumNodesConsidered()Returns the number of nodes that were considered during calculation before this path was found.- Returns:
- The number of nodes that were considered before finding this path
-
getSrc
Returns the start position of this path. This is the first element in theListthat is returned bypositions().- Returns:
- The start position of this path
-
getDest
Returns the end position of this path. This is the last element in theListthat is returned bypositions().- Returns:
- The end position of this path.
-
ticksRemainingFrom
Returns the estimated number of ticks to complete the path from the given node index.- Parameters:
pathPosition- The index of the node we're calculating from- Returns:
- The estimated number of ticks remaining frm the given position
-
cutoffAtLoadedChunks
Cuts off this path at the loaded chunk border, and returns the resulting path. Default implementation just returns this path, without the intended functionality.The argument is supposed to be a BlockStateInterface LOL LOL LOL LOL LOL
- Parameters:
bsi- The block state lookup, highly cursed- Returns:
- The result of this cut-off operation
-
staticCutoff
Cuts off this path using the min length and cutoff factor settings, and returns the resulting path. Default implementation just returns this path, without the intended functionality.- Parameters:
destination- The end goal of this path- Returns:
- The result of this cut-off operation
- See Also:
-
sanityCheck
Performs a series of checks to ensure that the assembly of the path went as expected.
-