Class UpdateAttackTargetTask<E extends MobEntity>

java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
net.minecraft.entity.ai.brain.task.UpdateAttackTargetTask<E>

public class UpdateAttackTargetTask<E extends MobEntity> extends Task<E>
Mappings:
Namespace Name
official axp
intermediary net/minecraft/class_4824
named net/minecraft/entity/ai/brain/task/UpdateAttackTargetTask
  • Field Details

    • startCondition

      private final Predicate<E extends MobEntity> startCondition
      Mappings:
      Namespace Name Mixin selector
      official a Laxp;a:Ljava/util/function/Predicate;
      intermediary field_22325 Lnet/minecraft/class_4824;field_22325:Ljava/util/function/Predicate;
      named startCondition Lnet/minecraft/entity/ai/brain/task/UpdateAttackTargetTask;startCondition:Ljava/util/function/Predicate;
    • targetGetter

      private final Function<E extends MobEntity,Optional<? extends LivingEntity>> targetGetter
      Mappings:
      Namespace Name Mixin selector
      official c Laxp;c:Ljava/util/function/Function;
      intermediary field_22326 Lnet/minecraft/class_4824;field_22326:Ljava/util/function/Function;
      named targetGetter Lnet/minecraft/entity/ai/brain/task/UpdateAttackTargetTask;targetGetter:Ljava/util/function/Function;
  • Constructor Details

    • UpdateAttackTargetTask

      public UpdateAttackTargetTask(Predicate<E> startCondition, Function<E,Optional<? extends LivingEntity>> targetGetter)
      Mappings:
      Namespace Name Mixin selector
      official <init> Laxp;<init>(Ljava/util/function/Predicate;Ljava/util/function/Function;)V
      intermediary <init> Lnet/minecraft/class_4824;<init>(Ljava/util/function/Predicate;Ljava/util/function/Function;)V
      named <init> Lnet/minecraft/entity/ai/brain/task/UpdateAttackTargetTask;<init>(Ljava/util/function/Predicate;Ljava/util/function/Function;)V
    • UpdateAttackTargetTask

      public UpdateAttackTargetTask(Function<E,Optional<? extends LivingEntity>> targetGetter)
      Mappings:
      Namespace Name Mixin selector
      official <init> Laxp;<init>(Ljava/util/function/Function;)V
      intermediary <init> Lnet/minecraft/class_4824;<init>(Ljava/util/function/Function;)V
      named <init> Lnet/minecraft/entity/ai/brain/task/UpdateAttackTargetTask;<init>(Ljava/util/function/Function;)V
  • Method Details

    • shouldRun

      protected boolean shouldRun(ServerWorld serverWorld, E e)
      Overrides:
      shouldRun in class Task<E extends MobEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Laxp;a(Labr;Latv;)Z
      intermediary method_24613 Lnet/minecraft/class_4824;method_24613(Lnet/minecraft/class_3218;Lnet/minecraft/class_1308;)Z
      named shouldRun Lnet/minecraft/entity/ai/brain/task/UpdateAttackTargetTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/MobEntity;)Z
    • run

      protected void run(ServerWorld serverWorld, E e, long long2)
      Overrides:
      run in class Task<E extends MobEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Laxp;a(Labr;Latv;J)V
      intermediary method_24614 Lnet/minecraft/class_4824;method_24614(Lnet/minecraft/class_3218;Lnet/minecraft/class_1308;J)V
      named run Lnet/minecraft/entity/ai/brain/task/UpdateAttackTargetTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/MobEntity;J)V
    • updateAttackTarget

      private void updateAttackTarget(E entity, LivingEntity target)
      Mappings:
      Namespace Name Mixin selector
      official a Laxp;a(Latv;Latt;)V
      intermediary method_24612 Lnet/minecraft/class_4824;method_24612(Lnet/minecraft/class_1308;Lnet/minecraft/class_1309;)V
      named updateAttackTarget Lnet/minecraft/entity/ai/brain/task/UpdateAttackTargetTask;updateAttackTarget(Lnet/minecraft/entity/mob/MobEntity;Lnet/minecraft/entity/LivingEntity;)V