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 auh
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 b Lauh;b: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 Lauh;c:Lass;
      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 Lauh;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> Lauh;<init>(Ljava/util/Map;Ljava/util/function/Predicate;Lass;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)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lauh;<init>(Ljava/util/function/Predicate;Lass;)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
  • Method Details

    • merge

      private static Map<MemoryModuleType<?>,​MemoryModuleState> merge​(Map<MemoryModuleType<?>,​MemoryModuleState> first, Map<MemoryModuleType<?>,​MemoryModuleState> second)
      Mappings:
      Namespace Name Mixin selector
      official a Lauh;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 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
    • 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 Lass;b(Laav;Lari;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 Lass;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 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
    • 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 Lass;d(Laav;Lari;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 Lass;c(Laav;Lari;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>
      Mappings:
      Namespace Name Mixin selector
      official toString Lass;toString()Ljava/lang/String;
      intermediary toString Lnet/minecraft/class_4097;toString()Ljava/lang/String;
      named toString Lnet/minecraft/entity/ai/brain/task/Task;toString()Ljava/lang/String;