Class FindEntityTask<E extends LivingEntity,​T extends LivingEntity>

java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
net.minecraft.entity.ai.brain.task.FindEntityTask<E,​T>

public class FindEntityTask<E extends LivingEntity,​T extends LivingEntity> extends Task<E>
Mappings:
Namespace Name
official awb
intermediary net/minecraft/class_4106
named net/minecraft/entity/ai/brain/task/FindEntityTask
  • Field Details

    • completionRange

      private final int completionRange
      Mappings:
      Namespace Name Mixin selector
      official a Lawb;a:I
      intermediary field_18355 Lnet/minecraft/class_4106;field_18355:I
      named completionRange Lnet/minecraft/entity/ai/brain/task/FindEntityTask;completionRange:I
    • speed

      private final float speed
      Mappings:
      Namespace Name Mixin selector
      official c Lawb;c:F
      intermediary field_18356 Lnet/minecraft/class_4106;field_18356:F
      named speed Lnet/minecraft/entity/ai/brain/task/FindEntityTask;speed:F
    • entityType

      private final EntityType<? extends T extends LivingEntity> entityType
      Mappings:
      Namespace Name Mixin selector
      official d Lawb;d:Latj;
      intermediary field_18357 Lnet/minecraft/class_4106;field_18357:Lnet/minecraft/class_1299;
      named entityType Lnet/minecraft/entity/ai/brain/task/FindEntityTask;entityType:Lnet/minecraft/entity/EntityType;
    • maxSquaredDistance

      private final int maxSquaredDistance
      Mappings:
      Namespace Name Mixin selector
      official e Lawb;e:I
      intermediary field_18358 Lnet/minecraft/class_4106;field_18358:I
      named maxSquaredDistance Lnet/minecraft/entity/ai/brain/task/FindEntityTask;maxSquaredDistance:I
    • predicate

      private final Predicate<T extends LivingEntity> predicate
      Mappings:
      Namespace Name Mixin selector
      official f Lawb;f:Ljava/util/function/Predicate;
      intermediary field_18359 Lnet/minecraft/class_4106;field_18359:Ljava/util/function/Predicate;
      named predicate Lnet/minecraft/entity/ai/brain/task/FindEntityTask;predicate:Ljava/util/function/Predicate;
    • shouldRunPredicate

      private final Predicate<E extends LivingEntity> shouldRunPredicate
      Mappings:
      Namespace Name Mixin selector
      official g Lawb;g:Ljava/util/function/Predicate;
      intermediary field_18360 Lnet/minecraft/class_4106;field_18360:Ljava/util/function/Predicate;
      named shouldRunPredicate Lnet/minecraft/entity/ai/brain/task/FindEntityTask;shouldRunPredicate:Ljava/util/function/Predicate;
    • targetModule

      private final MemoryModuleType<T extends LivingEntity> targetModule
      Mappings:
      Namespace Name Mixin selector
      official h Lawb;h:Lbbt;
      intermediary field_18361 Lnet/minecraft/class_4106;field_18361:Lnet/minecraft/class_4140;
      named targetModule Lnet/minecraft/entity/ai/brain/task/FindEntityTask;targetModule:Lnet/minecraft/entity/ai/brain/MemoryModuleType;
  • Constructor Details

    • FindEntityTask

      public FindEntityTask(EntityType<? extends T> entityType, int maxDistance, Predicate<E> shouldRunPredicate, Predicate<T> predicate, MemoryModuleType<T> targetModule, float speed, int completionRange)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lawb;<init>(Latj;ILjava/util/function/Predicate;Ljava/util/function/Predicate;Lbbt;FI)V
      intermediary <init> Lnet/minecraft/class_4106;<init>(Lnet/minecraft/class_1299;ILjava/util/function/Predicate;Ljava/util/function/Predicate;Lnet/minecraft/class_4140;FI)V
      named <init> Lnet/minecraft/entity/ai/brain/task/FindEntityTask;<init>(Lnet/minecraft/entity/EntityType;ILjava/util/function/Predicate;Ljava/util/function/Predicate;Lnet/minecraft/entity/ai/brain/MemoryModuleType;FI)V
  • Method Details

    • create

      public static <T extends LivingEntity> FindEntityTask<LivingEntity,​T> create(EntityType<? extends T> entityType, int maxDistance, MemoryModuleType<T> targetModule, float speed, int completionRange)
      Mappings:
      Namespace Name Mixin selector
      official a Lawb;a(Latj;ILbbt;FI)Lawb;
      intermediary method_18941 Lnet/minecraft/class_4106;method_18941(Lnet/minecraft/class_1299;ILnet/minecraft/class_4140;FI)Lnet/minecraft/class_4106;
      named create Lnet/minecraft/entity/ai/brain/task/FindEntityTask;create(Lnet/minecraft/entity/EntityType;ILnet/minecraft/entity/ai/brain/MemoryModuleType;FI)Lnet/minecraft/entity/ai/brain/task/FindEntityTask;
    • create

      public static <T extends LivingEntity> FindEntityTask<LivingEntity,​T> create(EntityType<? extends T> entityType, int maxDistance, Predicate<T> condition, MemoryModuleType<T> moduleType, float speed, int completionRange)
      Mappings:
      Namespace Name Mixin selector
      official a Lawb;a(Latj;ILjava/util/function/Predicate;Lbbt;FI)Lawb;
      intermediary method_35071 Lnet/minecraft/class_4106;method_35071(Lnet/minecraft/class_1299;ILjava/util/function/Predicate;Lnet/minecraft/class_4140;FI)Lnet/minecraft/class_4106;
      named create Lnet/minecraft/entity/ai/brain/task/FindEntityTask;create(Lnet/minecraft/entity/EntityType;ILjava/util/function/Predicate;Lnet/minecraft/entity/ai/brain/MemoryModuleType;FI)Lnet/minecraft/entity/ai/brain/task/FindEntityTask;
    • shouldRun

      protected boolean shouldRun(ServerWorld world, E entity)
      Overrides:
      shouldRun in class Task<E extends LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lavg;a(Labr;Latt;)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
    • anyVisibleTo

      private boolean anyVisibleTo(E entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lawb;a(Latt;)Z
      intermediary method_24582 Lnet/minecraft/class_4106;method_24582(Lnet/minecraft/class_1309;)Z
      named anyVisibleTo Lnet/minecraft/entity/ai/brain/task/FindEntityTask;anyVisibleTo(Lnet/minecraft/entity/LivingEntity;)Z
    • testPredicate

      private boolean testPredicate(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      official b Lawb;b(Latt;)Z
      intermediary method_24583 Lnet/minecraft/class_4106;method_24583(Lnet/minecraft/class_1309;)Z
      named testPredicate Lnet/minecraft/entity/ai/brain/task/FindEntityTask;testPredicate(Lnet/minecraft/entity/LivingEntity;)Z
    • run

      protected void run(ServerWorld world, E entity, long time)
      Overrides:
      run in class Task<E extends LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lavg;a(Labr;Latt;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