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
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowsContinuation
private Predicate<E>
condition
private Task<? super E>
delegate
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
Constructors Constructor Description ConditionalTask(Predicate<E> condition, Task<? super E> delegate)
ConditionalTask(Map<MemoryModuleType<?>,MemoryModuleState> requiredMemoryStates, Predicate<E> condition, Task<? super E> delegate, boolean allowsContinuation)
-
Method Summary
Modifier and Type Method Description protected 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)
String
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 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
- 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
- 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
- Overrides:
shouldRun
in classTask<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
- Overrides:
shouldKeepRunning
in classTask<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 classTask<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
- Overrides:
run
in classTask<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
- Overrides:
keepRunning
in classTask<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
- Overrides:
finishRunning
in classTask<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
- Overrides:
toString
in classTask<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;
-