Class FindNewAttackTargetTask<E extends MobEntity>
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<E>
-
- net.minecraft.entity.ai.brain.task.FindNewAttackTargetTask<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Predicate<LivingEntity>
stopAttackingWhen
-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description FindNewAttackTargetTask()
FindNewAttackTargetTask(java.util.function.Predicate<LivingEntity> p_i231539_1_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
clearAttackTarget(E p_233987_1_)
private LivingEntity
getAttackTarget(E p_233985_1_)
private boolean
isCurrentTargetDeadOrRemoved(E p_233986_1_)
private boolean
isCurrentTargetInDifferentLevel(E p_233983_1_)
private static <E extends LivingEntity>
booleanisTiredOfTryingToReachTarget(E p_233982_0_)
protected void
start(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_)
-
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
canStillUse, checkExtraStartConditions, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
-
-
-
Field Detail
-
stopAttackingWhen
private final java.util.function.Predicate<LivingEntity> stopAttackingWhen
-
-
Constructor Detail
-
FindNewAttackTargetTask
public FindNewAttackTargetTask(java.util.function.Predicate<LivingEntity> p_i231539_1_)
-
FindNewAttackTargetTask
public FindNewAttackTargetTask()
-
-
Method Detail
-
start
protected void start(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_)
-
isCurrentTargetInDifferentLevel
private boolean isCurrentTargetInDifferentLevel(E p_233983_1_)
-
getAttackTarget
private LivingEntity getAttackTarget(E p_233985_1_)
-
isTiredOfTryingToReachTarget
private static <E extends LivingEntity> boolean isTiredOfTryingToReachTarget(E p_233982_0_)
-
isCurrentTargetDeadOrRemoved
private boolean isCurrentTargetDeadOrRemoved(E p_233986_1_)
-
clearAttackTarget
private void clearAttackTarget(E p_233987_1_)
-
-