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
Modifier and TypeFieldDescriptionprivate final boolean
private final BiConsumer<E,
LivingEntity> private final Predicate<LivingEntity>
private static final int
Fields inherited from class net.minecraft.world.entity.ai.behavior.Behavior
DEFAULT_DURATION, entryCondition
-
Constructor Summary
ConstructorDescriptionStopAttackingIfTargetInvalid
(BiConsumer<E, LivingEntity> p_217399_) StopAttackingIfTargetInvalid
(Predicate<LivingEntity> p_24236_) StopAttackingIfTargetInvalid
(Predicate<LivingEntity> p_217401_, BiConsumer<E, LivingEntity> p_217402_) StopAttackingIfTargetInvalid
(Predicate<LivingEntity> p_217404_, BiConsumer<E, LivingEntity> p_217405_, boolean p_217406_) -
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:
-
stopAttackingWhen
-
onTargetErased
-
canGrowTiredOfTryingToReachTarget
private final boolean canGrowTiredOfTryingToReachTarget
-
-
Constructor Details
-
StopAttackingIfTargetInvalid
public StopAttackingIfTargetInvalid(Predicate<LivingEntity> p_217404_, BiConsumer<E, LivingEntity> p_217405_, boolean p_217406_) -
StopAttackingIfTargetInvalid
public StopAttackingIfTargetInvalid(Predicate<LivingEntity> p_217401_, BiConsumer<E, LivingEntity> p_217402_) -
StopAttackingIfTargetInvalid
-
StopAttackingIfTargetInvalid
-
StopAttackingIfTargetInvalid
public StopAttackingIfTargetInvalid()
-
-
Method Details