Class Swim<T extends Mob>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<T>
net.minecraft.world.entity.ai.behavior.Swim<T>
- All Implemented Interfaces:
BehaviorControl<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class Behavior
Behavior.Status -
Field Summary
FieldsFields inherited from class Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanStillUse(ServerLevel level, Mob body, long timestamp) protected booleancheckExtraStartConditions(ServerLevel level, Mob body) static <T extends Mob>
booleanshouldSwim(T mob) protected voidtick(ServerLevel level, Mob body, long timestamp) Methods inherited from class Behavior
debugString, doStop, getRequiredMemories, getStatus, hasRequiredMemories, start, stop, tickOrStop, timedOut, tryStart
-
Field Details
-
chance
private final float chance
-
-
Constructor Details
-
Swim
public Swim(float chance)
-
-
Method Details
-
shouldSwim
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<T extends Mob>
-
canStillUse
- Overrides:
canStillUsein classBehavior<T extends Mob>
-
tick
-