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
-
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 int
completionRange
private EntityType<? extends T>
entityType
private int
maxSquaredDistance
private Predicate<T>
predicate
private Predicate<E>
shouldRunPredicate
private float
speed
private MemoryModuleType<T>
targetModule
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
requiredMemoryStates
-
Constructor Summary
Constructors Constructor Description FindEntityTask(EntityType<? extends T> entityType, int maxDistance, Predicate<E> shouldRunPredicate, Predicate<T> predicate, MemoryModuleType<T> targetModule, float speed, int completionRange)
-
Method Summary
Modifier and Type Method Description private boolean
anyVisibleTo(E entity)
static <T extends LivingEntity>
FindEntityTask<LivingEntity,T>create(EntityType<? extends T> entityType, int maxDistance, MemoryModuleType<T> targetModule, float speed, int completionRange)
protected void
run(ServerWorld world, E entity, long time)
protected boolean
shouldRun(ServerWorld world, E entity)
private boolean
testPredicate(LivingEntity entity)
Methods inherited from class net.minecraft.entity.ai.brain.task.Task
finishRunning, getStatus, isTimeLimitExceeded, keepRunning, shouldKeepRunning, stop, tick, toString, tryStarting
-
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
- 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
- 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
- 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
- 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
- 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
-
anyVisibleTo
- 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
- 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
- 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
-