public class GoalNear extends java.lang.Object implements Goal, IGoalRenderPos
Constructor and Description |
---|
GoalNear(net.minecraft.util.math.BlockPos pos,
int range) |
Modifier and Type | Method and Description |
---|---|
net.minecraft.util.math.BlockPos |
getGoalPos() |
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 GoalNear(net.minecraft.util.math.BlockPos pos, int range)
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 net.minecraft.util.math.BlockPos getGoalPos()
getGoalPos
in interface IGoalRenderPos
public java.lang.String toString()
toString
in class java.lang.Object