public class GoalRunAway extends java.lang.Object implements Goal
Constructor and Description |
---|
GoalRunAway(double distance,
net.minecraft.util.math.BlockPos... from) |
GoalRunAway(double distance,
java.lang.Integer maintainY,
net.minecraft.util.math.BlockPos... from) |
Modifier and Type | Method and Description |
---|---|
double |
heuristic()
Returns the heuristic at the goal.
|
double |
heuristic(int x,
int y,
int z)
Estimate the number of ticks it will take to get to the goal
|
boolean |
isInGoal(int x,
int y,
int z)
Returns whether or not the specified position
meets the requirement for this goal based.
|
java.lang.String |
toString() |
public GoalRunAway(double distance, net.minecraft.util.math.BlockPos... from)
public GoalRunAway(double distance, java.lang.Integer maintainY, net.minecraft.util.math.BlockPos... from)
public boolean isInGoal(int x, int y, int z)
Goal
public double heuristic(int x, int y, int z)
Goal
public double heuristic()
Goal
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 metpublic java.lang.String toString()
toString
in class java.lang.Object