Class ForgetAttackTargetTask<E extends MobEntity>
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<E>
-
- net.minecraft.entity.ai.brain.task.ForgetAttackTargetTask<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<E>
canAttackPredicate
private java.util.function.Function<E,java.util.Optional<? extends LivingEntity>>
targetFinderFunction
-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description ForgetAttackTargetTask(java.util.function.Function<E,java.util.Optional<? extends LivingEntity>> p_i231536_1_)
ForgetAttackTargetTask(java.util.function.Predicate<E> p_i231537_1_, java.util.function.Function<E,java.util.Optional<? extends LivingEntity>> p_i231537_2_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
private void
setAttackTarget(E p_233976_1_, LivingEntity p_233976_2_)
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, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
-
-
-
Field Detail
-
canAttackPredicate
private final java.util.function.Predicate<E extends MobEntity> canAttackPredicate
-
targetFinderFunction
private final java.util.function.Function<E extends MobEntity,java.util.Optional<? extends LivingEntity>> targetFinderFunction
-
-
Constructor Detail
-
ForgetAttackTargetTask
public ForgetAttackTargetTask(java.util.function.Predicate<E> p_i231537_1_, java.util.function.Function<E,java.util.Optional<? extends LivingEntity>> p_i231537_2_)
-
ForgetAttackTargetTask
public ForgetAttackTargetTask(java.util.function.Function<E,java.util.Optional<? extends LivingEntity>> p_i231536_1_)
-
-
Method Detail
-
checkExtraStartConditions
protected boolean checkExtraStartConditions(ServerWorld p_212832_1_, E p_212832_2_)
- Overrides:
checkExtraStartConditions
in classTask<E extends MobEntity>
-
start
protected void start(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_)
-
setAttackTarget
private void setAttackTarget(E p_233976_1_, LivingEntity p_233976_2_)
-
-