Class PanicGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.PanicGoal
- Direct Known Subclasses:
Fox.FoxPanicGoal
,Panda.PandaPanicGoal
,Rabbit.RabbitPanicGoal
,TamableAnimal.TamableAnimalPanicGoal
,Turtle.TurtlePanicGoal
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected final PathfinderMob
private final Function
<PathfinderMob, TagKey<DamageType>> protected double
protected double
protected double
protected final double
static final int
-
Constructor Summary
ConstructorDescriptionPanicGoal
(PathfinderMob p_25691_, double p_25692_) PanicGoal
(PathfinderMob p_343339_, double p_343298_, Function<PathfinderMob, TagKey<DamageType>> p_344730_) PanicGoal
(PathfinderMob p_344360_, double p_345088_, TagKey<DamageType> p_345524_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
canUse()
protected boolean
boolean
protected BlockPos
lookForWater
(BlockGetter p_198173_, Entity p_198174_, int p_198175_) protected boolean
void
start()
void
stop()
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, tick, toString
-
Field Details
-
WATER_CHECK_DISTANCE_VERTICAL
public static final int WATER_CHECK_DISTANCE_VERTICAL- See Also:
-
mob
-
speedModifier
protected final double speedModifier -
posX
protected double posX -
posY
protected double posY -
posZ
protected double posZ -
isRunning
protected boolean isRunning -
panicCausingDamageTypes
-
-
Constructor Details
-
PanicGoal
-
PanicGoal
-
PanicGoal
public PanicGoal(PathfinderMob p_343339_, double p_343298_, Function<PathfinderMob, TagKey<DamageType>> p_344730_)
-
-
Method Details
-
canUse
public boolean canUse() -
shouldPanic
protected boolean shouldPanic() -
findRandomPosition
protected boolean findRandomPosition() -
isRunning
public boolean isRunning() -
start
public void start() -
stop
public void stop() -
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUse
in classGoal
-
lookForWater
-