Class WalkTowardClosestAdultTask<E extends PassiveEntity>

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

public class WalkTowardClosestAdultTask<E extends PassiveEntity> extends Task<E>
Mappings:
Namespace Name
official ayq
intermediary net/minecraft/class_5355
named net/minecraft/entity/ai/brain/task/WalkTowardClosestAdultTask
  • Field Details

    • executionRange

      private final UniformIntProvider executionRange
      Mappings:
      Namespace Name Mixin selector
      official a Layq;a:Lavb;
      intermediary field_25357 Lnet/minecraft/class_5355;field_25357:Lnet/minecraft/class_6019;
      named executionRange Lnet/minecraft/entity/ai/brain/task/WalkTowardClosestAdultTask;executionRange:Lnet/minecraft/util/math/intprovider/UniformIntProvider;
    • speed

      private final Function<LivingEntity,Float> speed
      Mappings:
      Namespace Name Mixin selector
      official c Layq;c:Ljava/util/function/Function;
      intermediary field_25358 Lnet/minecraft/class_5355;field_25358:Ljava/util/function/Function;
      named speed Lnet/minecraft/entity/ai/brain/task/WalkTowardClosestAdultTask;speed:Ljava/util/function/Function;
  • Constructor Details

    • WalkTowardClosestAdultTask

      public WalkTowardClosestAdultTask(UniformIntProvider executionRange, float speed)
      Mappings:
      Namespace Name Mixin selector
      official <init> Layq;<init>(Lavb;F)V
      intermediary <init> Lnet/minecraft/class_5355;<init>(Lnet/minecraft/class_6019;F)V
      named <init> Lnet/minecraft/entity/ai/brain/task/WalkTowardClosestAdultTask;<init>(Lnet/minecraft/util/math/intprovider/UniformIntProvider;F)V
    • WalkTowardClosestAdultTask

      public WalkTowardClosestAdultTask(UniformIntProvider executionRange, Function<LivingEntity,Float> speed)
      Mappings:
      Namespace Name Mixin selector
      official <init> Layq;<init>(Lavb;Ljava/util/function/Function;)V
      intermediary <init> Lnet/minecraft/class_5355;<init>(Lnet/minecraft/class_6019;Ljava/util/function/Function;)V
      named <init> Lnet/minecraft/entity/ai/brain/task/WalkTowardClosestAdultTask;<init>(Lnet/minecraft/util/math/intprovider/UniformIntProvider;Ljava/util/function/Function;)V
  • Method Details

    • shouldRun

      protected boolean shouldRun(ServerWorld serverWorld, E e)
      Overrides:
      shouldRun in class Task<E extends PassiveEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Layq;a(Ladi;Lawr;)Z
      intermediary method_29521 Lnet/minecraft/class_5355;method_29521(Lnet/minecraft/class_3218;Lnet/minecraft/class_1296;)Z
      named shouldRun Lnet/minecraft/entity/ai/brain/task/WalkTowardClosestAdultTask;shouldRun(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/PassiveEntity;)Z
    • run

      protected void run(ServerWorld serverWorld, E e, long long2)
      Overrides:
      run in class Task<E extends PassiveEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Layq;a(Ladi;Lawr;J)V
      intermediary method_29522 Lnet/minecraft/class_5355;method_29522(Lnet/minecraft/class_3218;Lnet/minecraft/class_1296;J)V
      named run Lnet/minecraft/entity/ai/brain/task/WalkTowardClosestAdultTask;run(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/passive/PassiveEntity;J)V
    • getNearestVisibleAdult

      private PassiveEntity getNearestVisibleAdult(E entity)
      Mappings:
      Namespace Name Mixin selector
      official a Layq;a(Lawr;)Lawr;
      intermediary method_29520 Lnet/minecraft/class_5355;method_29520(Lnet/minecraft/class_1296;)Lnet/minecraft/class_1296;
      named getNearestVisibleAdult Lnet/minecraft/entity/ai/brain/task/WalkTowardClosestAdultTask;getNearestVisibleAdult(Lnet/minecraft/entity/passive/PassiveEntity;)Lnet/minecraft/entity/passive/PassiveEntity;