Class AnimalPanic<E extends PathfinderMob>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.AnimalPanic<E>
- All Implemented Interfaces:
BehaviorControl<E>
- Direct Known Subclasses:
ArmadilloAi.ArmadilloPanic
,CamelAi.CamelPanic
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Predicate
<PathfinderMob> private static final int
private static final int
private static final int
private static final int
private final float
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorDescriptionAnimalPanic
(float p_147385_) AnimalPanic
(float p_275357_, Predicate<E> p_275369_) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel p_147391_, E p_147392_, long p_147393_) protected boolean
checkExtraStartConditions
(ServerLevel p_275286_, E p_275721_) private Vec3
getPanicPos
(E p_196639_, ServerLevel p_196640_) lookForWater
(BlockGetter p_196642_, Entity p_196643_) protected void
start
(ServerLevel p_147399_, E p_147400_, long p_147401_) protected void
stop
(ServerLevel p_217118_, E p_217119_, long p_217120_) protected void
tick
(ServerLevel p_147403_, E p_147404_, long p_147405_) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
-
Field Details
-
PANIC_MIN_DURATION
private static final int PANIC_MIN_DURATION- See Also:
-
PANIC_MAX_DURATION
private static final int PANIC_MAX_DURATION- See Also:
-
PANIC_DISTANCE_HORIZONTAL
private static final int PANIC_DISTANCE_HORIZONTAL- See Also:
-
PANIC_DISTANCE_VERTICAL
private static final int PANIC_DISTANCE_VERTICAL- See Also:
-
DEFAULT_SHOULD_PANIC_PREDICATE
-
speedMultiplier
private final float speedMultiplier -
shouldPanic
-
-
Constructor Details
-
AnimalPanic
public AnimalPanic(float p_147385_) -
AnimalPanic
-
-
Method Details
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<E extends PathfinderMob>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<E extends PathfinderMob>
-
start
- Overrides:
start
in classBehavior<E extends PathfinderMob>
-
stop
- Overrides:
stop
in classBehavior<E extends PathfinderMob>
-
tick
- Overrides:
tick
in classBehavior<E extends PathfinderMob>
-
getPanicPos
-
lookForWater
-