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 int
timer
Fields 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 boolean
canStart()
protected void
eatSweetBerry()
double
getDesiredSquaredDistanceToTarget()
protected boolean
isTargetPos(WorldView world, BlockPos pos)
boolean
shouldResetPath()
void
start()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.MoveToTargetPosGoal
findTargetPos, getInterval, getTargetPos, hasReached, shouldContinue, startMovingToTarget
Methods 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:
getDesiredSquaredDistanceToTarget
in classMoveToTargetPosGoal
-
shouldResetPath
public boolean shouldResetPath()- Overrides:
shouldResetPath
in classMoveToTargetPosGoal
-
isTargetPos
- Specified by:
isTargetPos
in classMoveToTargetPosGoal
-
tick
public void tick()- Overrides:
tick
in classMoveToTargetPosGoal
-
eatSweetBerry
protected void eatSweetBerry() -
canStart
public boolean canStart()- Overrides:
canStart
in classMoveToTargetPosGoal
-
start
public void start()- Overrides:
start
in classMoveToTargetPosGoal
-