Class DefeatTargetTask

java.lang.Object
net.minecraft.entity.ai.brain.task.Task<LivingEntity>
net.minecraft.entity.ai.brain.task.DefeatTargetTask

public class DefeatTargetTask extends Task<LivingEntity>
Mappings:
Namespace Name
official bbd
intermediary net/minecraft/class_4825
named net/minecraft/entity/ai/brain/task/DefeatTargetTask
  • Field Details

    • duration

      private final int duration
      Mappings:
      Namespace Name Mixin selector
      official a Lbbd;a:I
      intermediary field_22327 Lnet/minecraft/class_4825;field_22327:I
      named duration Lnet/minecraft/entity/ai/brain/task/DefeatTargetTask;duration:I
    • predicate

      private final BiPredicate<LivingEntity,LivingEntity> predicate
      Mappings:
      Namespace Name Mixin selector
      official c Lbbd;c:Ljava/util/function/BiPredicate;
      intermediary field_25157 Lnet/minecraft/class_4825;field_25157:Ljava/util/function/BiPredicate;
      named predicate Lnet/minecraft/entity/ai/brain/task/DefeatTargetTask;predicate:Ljava/util/function/BiPredicate;
  • Constructor Details

    • DefeatTargetTask

      public DefeatTargetTask(int duration, BiPredicate<LivingEntity,LivingEntity> predicate)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbbd;<init>(ILjava/util/function/BiPredicate;)V
      intermediary <init> Lnet/minecraft/class_4825;<init>(ILjava/util/function/BiPredicate;)V
      named <init> Lnet/minecraft/entity/ai/brain/task/DefeatTargetTask;<init>(ILjava/util/function/BiPredicate;)V
  • Method Details

    • shouldRun

      protected boolean shouldRun(ServerWorld world, LivingEntity entity)
      Overrides:
      shouldRun in class Task<LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Layt;a(Ladi;Laxh;)Z
      intermediary method_18919 Lnet/minecraft/class_4097;method_18919(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)Z
      named shouldRun Lnet/minecraft/entity/ai/brain/task/Task;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)Z
    • run

      protected void run(ServerWorld world, LivingEntity entity, long time)
      Overrides:
      run in class Task<LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Layt;a(Ladi;Laxh;J)V
      intermediary method_18920 Lnet/minecraft/class_4097;method_18920(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;J)V
      named run Lnet/minecraft/entity/ai/brain/task/Task;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;J)V
    • getAttackTarget

      private LivingEntity getAttackTarget(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lbbd;a(Laxh;)Laxh;
      intermediary method_24616 Lnet/minecraft/class_4825;method_24616(Lnet/minecraft/class_1309;)Lnet/minecraft/class_1309;
      named getAttackTarget Lnet/minecraft/entity/ai/brain/task/DefeatTargetTask;getAttackTarget(Lnet/minecraft/entity/LivingEntity;)Lnet/minecraft/entity/LivingEntity;