Class ConditionalTask<E extends LivingEntity>

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

public class ConditionalTask<E extends LivingEntity> extends Task<E>
Mappings:
Namespace Name
official awz
intermediary net/minecraft/class_4820
named net/minecraft/entity/ai/brain/task/ConditionalTask
  • Field Details

    • condition

      private final Predicate<E extends LivingEntity> condition
      Mappings:
      Namespace Name Mixin selector
      official a Lawz;a:Ljava/util/function/Predicate;
      intermediary field_22313 Lnet/minecraft/class_4820;field_22313:Ljava/util/function/Predicate;
      named condition Lnet/minecraft/entity/ai/brain/task/ConditionalTask;condition:Ljava/util/function/Predicate;
    • delegate

      private final Task<? super E extends LivingEntity> delegate
      Mappings:
      Namespace Name Mixin selector
      official c Lawz;c:Lavg;
      intermediary field_22314 Lnet/minecraft/class_4820;field_22314:Lnet/minecraft/class_4097;
      named delegate Lnet/minecraft/entity/ai/brain/task/ConditionalTask;delegate:Lnet/minecraft/entity/ai/brain/task/Task;
    • allowsContinuation

      private final boolean allowsContinuation
      Mappings:
      Namespace Name Mixin selector
      official d Lawz;d:Z
      intermediary field_22315 Lnet/minecraft/class_4820;field_22315:Z
      named allowsContinuation Lnet/minecraft/entity/ai/brain/task/ConditionalTask;allowsContinuation:Z
  • Constructor Details

    • ConditionalTask

      public ConditionalTask(Map<MemoryModuleType<?>,​MemoryModuleState> requiredMemoryStates, Predicate<E> condition, Task<? super E> delegate, boolean allowsContinuation)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lawz;<init>(Ljava/util/Map;Ljava/util/function/Predicate;Lavg;Z)V
      intermediary <init> Lnet/minecraft/class_4820;<init>(Ljava/util/Map;Ljava/util/function/Predicate;Lnet/minecraft/class_4097;Z)V
      named <init> Lnet/minecraft/entity/ai/brain/task/ConditionalTask;<init>(Ljava/util/Map;Ljava/util/function/Predicate;Lnet/minecraft/entity/ai/brain/task/Task;Z)V
    • ConditionalTask

      public ConditionalTask(Predicate<E> condition, Task<? super E> delegate, boolean allowsContinuation)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lawz;<init>(Ljava/util/function/Predicate;Lavg;Z)V
      intermediary <init> Lnet/minecraft/class_4820;<init>(Ljava/util/function/Predicate;Lnet/minecraft/class_4097;Z)V
      named <init> Lnet/minecraft/entity/ai/brain/task/ConditionalTask;<init>(Ljava/util/function/Predicate;Lnet/minecraft/entity/ai/brain/task/Task;Z)V
    • ConditionalTask

      public ConditionalTask(Predicate<E> condition, Task<? super E> delegate)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lawz;<init>(Ljava/util/function/Predicate;Lavg;)V
      intermediary <init> Lnet/minecraft/class_4820;<init>(Ljava/util/function/Predicate;Lnet/minecraft/class_4097;)V
      named <init> Lnet/minecraft/entity/ai/brain/task/ConditionalTask;<init>(Ljava/util/function/Predicate;Lnet/minecraft/entity/ai/brain/task/Task;)V
    • ConditionalTask

      public ConditionalTask(Map<MemoryModuleType<?>,​MemoryModuleState> memory, Task<? super E> delegate)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lawz;<init>(Ljava/util/Map;Lavg;)V
      intermediary <init> Lnet/minecraft/class_4820;<init>(Ljava/util/Map;Lnet/minecraft/class_4097;)V
      named <init> Lnet/minecraft/entity/ai/brain/task/ConditionalTask;<init>(Ljava/util/Map;Lnet/minecraft/entity/ai/brain/task/Task;)V
  • Method Details

    • merge

      private static Map<MemoryModuleType<?>,​MemoryModuleState> merge(Map<MemoryModuleType<?>,​MemoryModuleState> first, Map<MemoryModuleType<?>,​MemoryModuleState> second)
      Mappings:
      Namespace Name Mixin selector
      official a Lawz;a(Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;
      intermediary method_24597 Lnet/minecraft/class_4820;method_24597(Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;
      named merge Lnet/minecraft/entity/ai/brain/task/ConditionalTask;merge(Ljava/util/Map;Ljava/util/Map;)Ljava/util/Map;
    • 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
    • shouldKeepRunning

      protected boolean shouldKeepRunning(ServerWorld world, E entity, long time)
      Overrides:
      shouldKeepRunning in class Task<E extends LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official b Lavg;b(Labr;Latt;J)Z
      intermediary method_18927 Lnet/minecraft/class_4097;method_18927(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;J)Z
      named shouldKeepRunning Lnet/minecraft/entity/ai/brain/task/Task;shouldKeepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;J)Z
    • isTimeLimitExceeded

      protected boolean isTimeLimitExceeded(long time)
      Overrides:
      isTimeLimitExceeded in class Task<E extends LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official a Lavg;a(J)Z
      intermediary method_18915 Lnet/minecraft/class_4097;method_18915(J)Z
      named isTimeLimitExceeded Lnet/minecraft/entity/ai/brain/task/Task;isTimeLimitExceeded(J)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
    • keepRunning

      protected void keepRunning(ServerWorld world, E entity, long time)
      Overrides:
      keepRunning in class Task<E extends LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official d Lavg;d(Labr;Latt;J)V
      intermediary method_18924 Lnet/minecraft/class_4097;method_18924(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;J)V
      named keepRunning Lnet/minecraft/entity/ai/brain/task/Task;keepRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;J)V
    • finishRunning

      protected void finishRunning(ServerWorld world, E entity, long time)
      Overrides:
      finishRunning in class Task<E extends LivingEntity>
      Mappings:
      Namespace Name Mixin selector
      official c Lavg;c(Labr;Latt;J)V
      intermediary method_18926 Lnet/minecraft/class_4097;method_18926(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;J)V
      named finishRunning Lnet/minecraft/entity/ai/brain/task/Task;finishRunning(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;J)V
    • toString

      public String toString()
      Overrides:
      toString in class Task<E extends LivingEntity>