Package net.minecraft.entity.passive
Class RabbitEntity.EatCarrotCropGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.MoveToTargetPosGoal
net.minecraft.entity.passive.RabbitEntity.EatCarrotCropGoal
- Enclosing class:
- RabbitEntity
static class RabbitEntity.EatCarrotCropGoal 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 private boolean
hasTarget
private RabbitEntity
rabbit
private boolean
wantsCarrots
Fields inherited from class net.minecraft.entity.ai.goal.MoveToTargetPosGoal
cooldown, lowestY, mob, speed, targetPos, tryingTime
-
Constructor Summary
Constructors Constructor Description EatCarrotCropGoal(RabbitEntity rabbit)
-
Method Summary
Modifier and Type Method Description boolean
canStart()
protected boolean
isTargetPos(WorldView world, BlockPos pos)
boolean
shouldContinue()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.MoveToTargetPosGoal
findTargetPos, getDesiredSquaredDistanceToTarget, getInterval, getTargetPos, hasReached, shouldResetPath, start, startMovingToTarget
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, stop, toString
-
Field Details
-
rabbit
-
wantsCarrots
private boolean wantsCarrots -
hasTarget
private boolean hasTarget
-
-
Constructor Details
-
EatCarrotCropGoal
-
-
Method Details
-
canStart
public boolean canStart()- Overrides:
canStart
in classMoveToTargetPosGoal
-
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinue
in classMoveToTargetPosGoal
-
tick
public void tick()- Overrides:
tick
in classMoveToTargetPosGoal
-
isTargetPos
- Specified by:
isTargetPos
in classMoveToTargetPosGoal
-