public abstract class MoveToTargetPosGoal extends Goal
Goal.Control
Modifier and Type | Field and Description |
---|---|
protected int |
cooldown |
protected int |
lowestY |
private int |
maxYDifference |
protected PathAwareEntity |
mob |
private int |
range |
private boolean |
reached |
private int |
safeWaitingTime |
double |
speed |
protected BlockPos |
targetPos |
protected int |
tryingTime |
Constructor and Description |
---|
MoveToTargetPosGoal(PathAwareEntity mob,
double speed,
int range) |
MoveToTargetPosGoal(PathAwareEntity mob,
double speed,
int range,
int maxYDifference) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStart() |
protected boolean |
findTargetPos() |
double |
getDesiredSquaredDistanceToTarget() |
protected int |
getInterval(PathAwareEntity mob) |
protected BlockPos |
getTargetPos() |
protected boolean |
hasReached() |
protected abstract boolean |
isTargetPos(WorldView world,
BlockPos pos) |
boolean |
shouldContinue() |
boolean |
shouldResetPath() |
void |
start() |
protected void |
startMovingToTarget() |
void |
tick() |
canStop, getControls, setControls, stop, toString
protected final PathAwareEntity mob
public final double speed
protected int cooldown
protected int tryingTime
private int safeWaitingTime
protected BlockPos targetPos
private boolean reached
private final int range
private final int maxYDifference
protected int lowestY
public MoveToTargetPosGoal(PathAwareEntity mob, double speed, int range)
public MoveToTargetPosGoal(PathAwareEntity mob, double speed, int range, int maxYDifference)
protected int getInterval(PathAwareEntity mob)
public boolean shouldContinue()
shouldContinue
in class Goal
protected void startMovingToTarget()
public double getDesiredSquaredDistanceToTarget()
protected BlockPos getTargetPos()
public boolean shouldResetPath()
protected boolean hasReached()
protected boolean findTargetPos()