public class FoxEntity.EatSweetBerriesGoal extends MoveToTargetPosGoal
Goal.Control| Modifier and Type | Field and Description |
|---|---|
protected int |
timer |
cooldown, lowestY, mob, speed, targetPos, tryingTime| Constructor and Description |
|---|
EatSweetBerriesGoal(double speed,
int range,
int maxYDifference) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canStart() |
protected void |
eatSweetBerry() |
double |
getDesiredSquaredDistanceToTarget() |
protected boolean |
isTargetPos(WorldView world,
BlockPos pos) |
boolean |
shouldResetPath() |
void |
start() |
void |
tick() |
findTargetPos, getInterval, getTargetPos, hasReached, shouldContinue, startMovingToTargetcanStop, getControls, setControls, stop, toStringpublic EatSweetBerriesGoal(double speed,
int range,
int maxYDifference)
public double getDesiredSquaredDistanceToTarget()
getDesiredSquaredDistanceToTarget in class MoveToTargetPosGoalpublic boolean shouldResetPath()
shouldResetPath in class MoveToTargetPosGoalprotected boolean isTargetPos(WorldView world, BlockPos pos)
isTargetPos in class MoveToTargetPosGoalpublic void tick()
tick in class MoveToTargetPosGoalprotected void eatSweetBerry()
public boolean canStart()
canStart in class MoveToTargetPosGoalpublic void start()
start in class MoveToTargetPosGoal