public abstract class MoveToTargetPosGoal extends Goal
Goal.Control
Modifier and Type | Field and Description |
---|---|
protected int |
cooldown |
protected int |
lowestY |
private int |
maxYDifference |
protected MobEntityWithAi |
mob |
private int |
range |
private boolean |
reached |
private int |
safeWaitingTime |
double |
speed |
protected BlockPos |
targetPos |
protected int |
tryingTime |
Constructor and Description |
---|
MoveToTargetPosGoal(MobEntityWithAi mob,
double speed,
int range) |
MoveToTargetPosGoal(MobEntityWithAi mob,
double speed,
int range,
int maxYDifference) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStart() |
protected boolean |
findTargetPos() |
double |
getDesiredSquaredDistanceToTarget() |
protected int |
getInterval(MobEntityWithAi mob) |
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 MobEntityWithAi 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(MobEntityWithAi mob, double speed, int range)
public MoveToTargetPosGoal(MobEntityWithAi mob, double speed, int range, int maxYDifference)
protected int getInterval(MobEntityWithAi mob)
public boolean shouldContinue()
shouldContinue
in class Goal
protected void startMovingToTarget()
public double getDesiredSquaredDistanceToTarget()
public boolean shouldResetPath()
protected boolean hasReached()
protected boolean findTargetPos()