net.minecraft.world.entity.ai.behavior

public class StopAttackingIfTargetInvalid<E extends Mob>

extends Behavior<E>

axs
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>
c
stopAttackingWhen
field_22329
alternativeCondition
f_24233_
private final Consumer<E>
d
onTargetErased
field_30178
forgetCallback
f_147979_

Constructor summary

ModifierConstructor
public (Predicate<LivingEntity> condition, Consumer<E> forgetCallback)
public (Predicate<LivingEntity> alternativeCondition)
public (Consumer<E> forgetCallback)
public ()

Method summary

Modifier and TypeMethod
protected void
a(abr 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)