Package net.minecraft.entity.passive
Class DolphinEntity.SwimWithPlayerGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.passive.DolphinEntity.SwimWithPlayerGoal
- Enclosing class:
- DolphinEntity
static class DolphinEntity.SwimWithPlayerGoal extends Goal
-
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 PlayerEntityclosestPlayerprivate DolphinEntitydolphinprivate doublespeed -
Constructor Summary
Constructors Constructor Description SwimWithPlayerGoal(DolphinEntity dolphin, double speed) -
Method Summary
Modifier and Type Method Description booleancanStart()booleanshouldContinue()voidstart()voidstop()voidtick()Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, toString
-
Field Details
-
dolphin
-
speed
private final double speed -
closestPlayer
-
-
Constructor Details
-
SwimWithPlayerGoal
SwimWithPlayerGoal(DolphinEntity dolphin, double speed)
-
-
Method Details
-
canStart
public boolean canStart() -
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinuein classGoal
-
start
public void start() -
stop
public void stop() -
tick
public void tick()
-