Class InteractWithEntityTask<E extends LivingEntity,T extends LivingEntity>
java.lang.Object
net.minecraft.entity.ai.brain.task.Task<E>
net.minecraft.entity.ai.brain.task.InteractWithEntityTask<E,T>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.brain.task.Task
Task.Status
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final int
private final MemoryModuleType<T>
private final float
private final EntityType<? extends T>
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
Constructor Summary
ConstructorDescriptionInteractWithEntityTask
(EntityType<? extends T> p_i50363_1_, int p_i50363_2_, Predicate<E> p_i50363_3_, Predicate<T> p_i50363_4_, MemoryModuleType<T> p_i50363_5_, float p_i50363_6_, int p_i50363_7_) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkExtraStartConditions
(ServerWorld p_212832_1_, E p_212832_2_) private boolean
isTargetValid
(LivingEntity p_233914_1_) static <T extends LivingEntity>
InteractWithEntityTask<LivingEntity,T> of
(EntityType<? extends T> p_220445_0_, int p_220445_1_, MemoryModuleType<T> p_220445_2_, float p_220445_3_, int p_220445_4_) private boolean
seesAtLeastOneValidTarget
(E p_233913_1_) protected void
start
(ServerWorld p_212831_1_, E p_212831_2_, long p_212831_3_) Methods inherited from class net.minecraft.entity.ai.brain.task.Task
canStillUse, doStop, getStatus, stop, tick, tickOrStop, timedOut, toString, tryStart
-
Field Details
-
maxDist
private final int maxDist -
speedModifier
private final float speedModifier -
type
-
interactionRangeSqr
private final int interactionRangeSqr -
targetFilter
-
selfFilter
-
memory
-
-
Constructor Details
-
InteractWithEntityTask
public InteractWithEntityTask(EntityType<? extends T> p_i50363_1_, int p_i50363_2_, Predicate<E> p_i50363_3_, Predicate<T> p_i50363_4_, MemoryModuleType<T> p_i50363_5_, float p_i50363_6_, int p_i50363_7_)
-
-
Method Details
-
of
public static <T extends LivingEntity> InteractWithEntityTask<LivingEntity,T> of(EntityType<? extends T> p_220445_0_, int p_220445_1_, MemoryModuleType<T> p_220445_2_, float p_220445_3_, int p_220445_4_) -
checkExtraStartConditions
- Overrides:
checkExtraStartConditions
in classTask<E extends LivingEntity>
-
seesAtLeastOneValidTarget
-
isTargetValid
-
start
- Overrides:
start
in classTask<E extends LivingEntity>
-