Class SpearRetreat
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<PathfinderMob>
net.minecraft.world.entity.ai.behavior.SpearRetreat
- All Implemented Interfaces:
BehaviorControl<PathfinderMob>
-
Nested Class Summary
Nested classes/interfaces inherited from class Behavior
Behavior.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprivate final doubleFields inherited from class Behavior
DEFAULT_DURATION, entryCondition -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanprotected booleancanStillUse(ServerLevel level, PathfinderMob body, long timestamp) protected booleancheckExtraStartConditions(ServerLevel level, PathfinderMob body) private @Nullable LivingEntitygetTarget(PathfinderMob mob) protected voidstart(ServerLevel level, PathfinderMob body, long timestamp) protected voidstop(ServerLevel level, PathfinderMob body, long timestamp) protected voidtick(ServerLevel level, PathfinderMob mob, long timestamp) Methods inherited from class Behavior
debugString, doStop, getRequiredMemories, getStatus, hasRequiredMemories, tickOrStop, timedOut, tryStart
-
Field Details
-
MIN_COOLDOWN_DISTANCE
public static final int MIN_COOLDOWN_DISTANCE- See Also:
-
MAX_COOLDOWN_DISTANCE
public static final int MAX_COOLDOWN_DISTANCE- See Also:
-
MAX_FLEEING_TIME
public static final int MAX_FLEEING_TIME- See Also:
-
speedModifierWhenRepositioning
private final double speedModifierWhenRepositioning
-
-
Constructor Details
-
SpearRetreat
public SpearRetreat(double speedModifierWhenRepositioning)
-
-
Method Details
-
getTarget
-
ableToAttack
-
checkExtraStartConditions
- Overrides:
checkExtraStartConditionsin classBehavior<PathfinderMob>
-
start
- Overrides:
startin classBehavior<PathfinderMob>
-
canStillUse
- Overrides:
canStillUsein classBehavior<PathfinderMob>
-
tick
- Overrides:
tickin classBehavior<PathfinderMob>
-
stop
- Overrides:
stopin classBehavior<PathfinderMob>
-