Class Swim
- All Implemented Interfaces:
BehaviorControl<Mob>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
FieldsFields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canStillUse
(ServerLevel pLevel, Mob pEntity, long pGameTime) protected boolean
checkExtraStartConditions
(ServerLevel pLevel, Mob pOwner) static boolean
shouldSwim
(Mob pMob) protected void
tick
(ServerLevel pLevel, Mob pOwner, long pGameTime) Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
debugString, doStop, getStatus, hasRequiredMemories, start, stop, tickOrStop, timedOut, tryStart
-
Field Details
-
chance
private final float chance
-
-
Constructor Details
-
Swim
public Swim(float pChance)
-
-
Method Details
-
shouldSwim
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classBehavior<Mob>
-
canStillUse
- Overrides:
canStillUse
in classBehavior<Mob>
-
tick
-