Class StopAttackingIfTargetInvalid<E extends Mob>
java.lang.Object
net.minecraft.world.entity.ai.behavior.Behavior<E>
net.minecraft.world.entity.ai.behavior.StopAttackingIfTargetInvalid<E>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.behavior.Behavior
Behavior.Status
-
Field Summary
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
entryCondition
-
Constructor Summary
ConstructorDescriptionStopAttackingIfTargetInvalid(Consumer<E> p_147981_)
StopAttackingIfTargetInvalid(Predicate<LivingEntity> p_24236_)
StopAttackingIfTargetInvalid(Predicate<LivingEntity> p_147983_, Consumer<E> p_147984_)
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
clearAttackTarget(E p_24256_)
private LivingEntity
getAttackTarget(E p_24252_)
private boolean
isCurrentTargetDeadOrRemoved(E p_24254_)
private boolean
isCurrentTargetInDifferentLevel(E p_24248_)
private static <E extends LivingEntity>
booleanisTiredOfTryingToReachTarget(E p_24246_)
protected void
start(ServerLevel p_24242_, E p_24243_, long p_24244_)
Methods inherited from class net.minecraft.world.entity.ai.behavior.Behavior
canStillUse, checkExtraStartConditions, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
Field Details
-
TIMEOUT_TO_GET_WITHIN_ATTACK_RANGE
private static final int TIMEOUT_TO_GET_WITHIN_ATTACK_RANGE- See Also:
- Constant Field Values
-
stopAttackingWhen
-
onTargetErased
-
-
Constructor Details
-
StopAttackingIfTargetInvalid
-
StopAttackingIfTargetInvalid
-
StopAttackingIfTargetInvalid
-
StopAttackingIfTargetInvalid
public StopAttackingIfTargetInvalid()
-
-
Method Details