public interface Goal
Modifier and Type | Method and Description |
---|---|
default double |
heuristic()
Returns the heuristic at the goal.
|
default double |
heuristic(net.minecraft.util.math.BlockPos pos) |
double |
heuristic(int x,
int y,
int z)
Estimate the number of ticks it will take to get to the goal
|
default boolean |
isInGoal(net.minecraft.util.math.BlockPos pos) |
boolean |
isInGoal(int x,
int y,
int z)
Returns whether or not the specified position
meets the requirement for this goal based.
|
boolean isInGoal(int x, int y, int z)
x
- The goal X positiony
- The goal Y positionz
- The goal Z positiondouble heuristic(int x, int y, int z)
x
- The goal X positiony
- The goal Y positionz
- The goal Z positiondefault boolean isInGoal(net.minecraft.util.math.BlockPos pos)
default double heuristic(net.minecraft.util.math.BlockPos pos)
default double heuristic()
heuristic() == heuristic(x,y,z)
when isInGoal(x,y,z) == true
This is needed by PathingBehavior#estimatedTicksToGoal
because
some Goals actually do not have a heuristic of 0 when that condition is met