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 atn
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 b Latn;b: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 Latn;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 Latn;d:Laqz;
      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 Latn;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 Latn;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 Latn;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 Latn;h:Lazf;
      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> Latn;<init>(Laqz;ILjava/util/function/Predicate;Ljava/util/function/Predicate;Lazf;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 Latn;a(Laqz;ILazf;FI)Latn;
      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;
    • shouldRun

      protected boolean shouldRun​(ServerWorld world, E entity)
      Overrides:
      shouldRun in class Task<E extends LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lass;a(Laav;Lari;)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 Latn;a(Lari;)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 Latn;b(Lari;)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 Lass;a(Laav;Lari;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