net.minecraft.world.entity.ai.behavior

public class StopAttackingIfTargetInvalid<E extends Mob>

extends Behavior<E>

bfh
net.minecraft.world.entity.ai.behavior.StopAttackingIfTargetInvalid
net.minecraft.class_4828
net.minecraft.entity.ai.brain.task.ForgetAttackTargetTask
net.minecraft.src.C_635_
net.minecraft.world.entity.ai.behavior.BehaviorAttackTargetForget

Field summary

Modifier and TypeField
private static final int
a
TIMEOUT_TO_GET_WITHIN_ATTACK_RANGE
field_30177
REMEMBER_TIME
f_147978_
private final Predicate<LivingEntity>
d
stopAttackingWhen
field_22329
alternativeCondition
f_24233_
private final BiConsumer<E, LivingEntity>
e
onTargetErased
field_30178
forgetCallback
f_147979_
private final boolean
f
canGrowTiredOfTryingToReachTarget
field_38102
shouldForgetIfTargetUnreachable
f_217397_

Constructor summary

ModifierConstructor
public (Predicate<LivingEntity> alternativePredicate, BiConsumer<E, LivingEntity> forgetCallback, boolean shouldForgetIfTargetUnreachable)
public (Predicate<LivingEntity> alternativePredicate, BiConsumer<E, LivingEntity> forgetCallback)
public (Predicate<LivingEntity> alternativePredicate)
public (BiConsumer<E, LivingEntity> forgetCallback)
public ()

Method summary

Modifier and TypeMethod
protected void
a(afo arg0, E arg1, long arg2)
start(ServerLevel arg0, E arg1, long arg2)
method_24623(class_3218 arg0, E arg1, long arg2)
run(ServerWorld arg0, E arg1, long arg2)
m_6735_(C_12_ p_24243_, E p_24244_, long arg2)
private boolean
b(E arg0)
isCurrentTargetInDifferentLevel(E arg0)
method_24622(E arg0)
isAttackTargetInAnotherWorld(E entity)
m_24247_(E arg0)
private LivingEntity
c(E arg0)
getAttackTarget(E arg0)
method_24625(E arg0)
getAttackTarget(E entity)
m_24251_(E arg0)
private static <E extends LivingEntity> boolean
a(E arg0)
isTiredOfTryingToReachTarget(E arg0)
method_24621(E arg0)
cannotReachTarget(E entity)
m_24245_(E p_24246_)
private boolean
d(E arg0)
isCurrentTargetDeadOrRemoved(E arg0)
method_24626(E arg0)
isAttackTargetDead(E entity)
m_24253_(E arg0)
protected void
a(E arg0)
clearAttackTarget(E arg0)
method_24627(E arg0)
forgetAttackTarget(E entity)
m_24255_(E arg0)