Package baritone.api.pathing.goals
Interface Goal
- All Known Implementing Classes:
GoalAxis,GoalBlock,GoalComposite,GoalGetToBlock,GoalInverted,GoalNear,GoalRunAway,GoalStrictDirection,GoalTwoBlocks,GoalXZ,GoalYLevel
public interface Goal
An abstract Goal for pathing, can be anything from a specific block to just a Y coordinate.
- Author:
- leijurv
-
Method Summary
Modifier and TypeMethodDescriptiondefault doubleReturns the heuristic at the goal.doubleheuristic(int x, int y, int z) Estimate the number of ticks it will take to get to the goaldefault doubleheuristic(net.minecraft.core.BlockPos pos) booleanisInGoal(int x, int y, int z) Returns whether or not the specified position meets the requirement for this goal based.default booleanisInGoal(net.minecraft.core.BlockPos pos)
-
Method Details
-
isInGoal
Returns whether or not the specified position meets the requirement for this goal based.- Parameters:
x- The goal X positiony- The goal Y positionz- The goal Z position- Returns:
- Whether or not it satisfies this goal
-
heuristic
Estimate the number of ticks it will take to get to the goal- Parameters:
x- The goal X positiony- The goal Y positionz- The goal Z position- Returns:
- The estimate number of ticks to satisfy the goal
-
isInGoal
-
heuristic
-
heuristic
Returns the heuristic at the goal. i.e.heuristic() == heuristic(x,y,z)whenisInGoal(x,y,z) == trueThis is needed byPathingBehavior#estimatedTicksToGoalbecause some Goals actually do not have a heuristic of 0 when that condition is met- Returns:
- The estimate number of ticks to satisfy the goal when the goal is already satisfied
-