Package net.minecraft.entity.ai.goal
Class EscapeDangerGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.EscapeDangerGoal
- Direct Known Subclasses:
FoxEntity.EscapeWhenNotAggressiveGoal,PandaEntity.ExtinguishFireGoal,PolarBearEntity.PolarBearEscapeDangerGoal,RabbitEntity.EscapeDangerGoal,TurtleEntity.TurtleEscapeDangerGoal
public class EscapeDangerGoal extends Goal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control -
Field Summary
-
Constructor Summary
Constructors Constructor Description EscapeDangerGoal(PathAwareEntity mob, double speed) -
Method Summary
Modifier and Type Method Description booleancanStart()protected booleanfindTarget()booleanisActive()protected BlockPoslocateClosestWater(BlockView blockView, Entity entity, int rangeX, int rangeY)booleanshouldContinue()voidstart()voidstop()Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, tick, toString
-
Field Details
-
mob
-
speed
protected final double speed -
targetX
protected double targetX -
targetY
protected double targetY -
targetZ
protected double targetZ -
active
protected boolean active
-
-
Constructor Details
-
EscapeDangerGoal
-
-
Method Details
-
canStart
public boolean canStart() -
findTarget
protected boolean findTarget() -
isActive
public boolean isActive() -
start
public void start() -
stop
public void stop() -
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinuein classGoal
-
locateClosestWater
-