Package net.minecraft.entity.passive
Class FoxEntity.EatSweetBerriesGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.MoveToTargetPosGoal
net.minecraft.entity.passive.FoxEntity.EatSweetBerriesGoal
- Enclosing class:
- FoxEntity
public class FoxEntity.EatSweetBerriesGoal extends MoveToTargetPosGoal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control -
Field Summary
Fields Modifier and Type Field Description protected inttimerFields inherited from class net.minecraft.entity.ai.goal.MoveToTargetPosGoal
cooldown, lowestY, mob, speed, targetPos, tryingTime -
Constructor Summary
Constructors Constructor Description EatSweetBerriesGoal(double speed, int range, int maxYDifference) -
Method Summary
Modifier and Type Method Description booleancanStart()protected voideatSweetBerry()doublegetDesiredSquaredDistanceToTarget()protected booleanisTargetPos(WorldView world, BlockPos pos)booleanshouldResetPath()voidstart()voidtick()Methods inherited from class net.minecraft.entity.ai.goal.MoveToTargetPosGoal
findTargetPos, getInterval, getTargetPos, hasReached, shouldContinue, startMovingToTargetMethods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, stop, toString
-
Field Details
-
timer
protected int timer
-
-
Constructor Details
-
EatSweetBerriesGoal
public EatSweetBerriesGoal(double speed, int range, int maxYDifference)
-
-
Method Details
-
getDesiredSquaredDistanceToTarget
public double getDesiredSquaredDistanceToTarget()- Overrides:
getDesiredSquaredDistanceToTargetin classMoveToTargetPosGoal
-
shouldResetPath
public boolean shouldResetPath()- Overrides:
shouldResetPathin classMoveToTargetPosGoal
-
isTargetPos
- Specified by:
isTargetPosin classMoveToTargetPosGoal
-
tick
public void tick()- Overrides:
tickin classMoveToTargetPosGoal
-
eatSweetBerry
protected void eatSweetBerry() -
canStart
public boolean canStart()- Overrides:
canStartin classMoveToTargetPosGoal
-
start
public void start()- Overrides:
startin classMoveToTargetPosGoal
-