Class ConditionalTask<E extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
net.minecraft.entity.ai.brain.task.ConditionalTask<E>
- Mappings:
Namespace Name official awz
intermediary net/minecraft/class_4820
named net/minecraft/entity/ai/brain/task/ConditionalTask
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
ConstructorDescriptionConditionalTask(Predicate<E> condition, Task<? super E> delegate)
ConditionalTask(Predicate<E> condition, Task<? super E> delegate, boolean allowsContinuation)
ConditionalTask(Map<MemoryModuleType<?>,MemoryModuleState> requiredMemoryStates, Predicate<E> condition, Task<? super E> delegate, boolean allowsContinuation)
ConditionalTask(Map<MemoryModuleType<?>,MemoryModuleState> memory, Task<? super E> delegate)
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
finishRunning(ServerWorld world, E entity, long time)
protected boolean
isTimeLimitExceeded(long time)
protected void
keepRunning(ServerWorld world, E entity, long time)
private static Map<MemoryModuleType<?>,MemoryModuleState>
merge(Map<MemoryModuleType<?>,MemoryModuleState> first, Map<MemoryModuleType<?>,MemoryModuleState> second)
protected void
run(ServerWorld world, E entity, long time)
protected boolean
shouldKeepRunning(ServerWorld world, E entity, long time)
protected boolean
shouldRun(ServerWorld world, E entity)
toString()
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
getStatus, stop, tick, tryStarting
-
Field Details
-
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
- 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
- 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
- Overrides:
shouldRun
in classTask<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
- Overrides:
shouldKeepRunning
in classTask<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 classTask<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
- Overrides:
run
in classTask<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
- Overrides:
keepRunning
in classTask<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
- Overrides:
finishRunning
in classTask<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
- Overrides:
toString
in classTask<E extends LivingEntity>
-