Class FindInteractionAndLookTargetTask
- java.lang.Object
-
- net.minecraft.entity.ai.brain.task.Task<LivingEntity>
-
- net.minecraft.entity.ai.brain.task.FindInteractionAndLookTargetTask
-
public class FindInteractionAndLookTargetTask extends Task<LivingEntity>
-
-
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
interactionRangeSqr
private java.util.function.Predicate<LivingEntity>
selfFilter
private java.util.function.Predicate<LivingEntity>
targetFilter
private EntityType<?>
type
-
Fields inherited from class net.minecraft.entity.ai.brain.task.Task
entryCondition
-
-
Constructor Summary
Constructors Constructor Description FindInteractionAndLookTargetTask(EntityType<?> p_i50348_1_, int p_i50348_2_)
FindInteractionAndLookTargetTask(EntityType<?> p_i50347_1_, int p_i50347_2_, java.util.function.Predicate<LivingEntity> p_i50347_3_, java.util.function.Predicate<LivingEntity> p_i50347_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkExtraStartConditions(ServerWorld p_212832_1_, LivingEntity p_212832_2_)
private java.util.List<LivingEntity>
getVisibleEntities(LivingEntity p_220530_1_)
private boolean
isMatchingTarget(LivingEntity p_220532_1_)
void
start(ServerWorld p_212831_1_, LivingEntity 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 Detail
-
type
private final EntityType<?> type
-
interactionRangeSqr
private final int interactionRangeSqr
-
targetFilter
private final java.util.function.Predicate<LivingEntity> targetFilter
-
selfFilter
private final java.util.function.Predicate<LivingEntity> selfFilter
-
-
Constructor Detail
-
FindInteractionAndLookTargetTask
public FindInteractionAndLookTargetTask(EntityType<?> p_i50347_1_, int p_i50347_2_, java.util.function.Predicate<LivingEntity> p_i50347_3_, java.util.function.Predicate<LivingEntity> p_i50347_4_)
-
FindInteractionAndLookTargetTask
public FindInteractionAndLookTargetTask(EntityType<?> p_i50348_1_, int p_i50348_2_)
-
-
Method Detail
-
checkExtraStartConditions
public boolean checkExtraStartConditions(ServerWorld p_212832_1_, LivingEntity p_212832_2_)
- Overrides:
checkExtraStartConditions
in classTask<LivingEntity>
-
start
public void start(ServerWorld p_212831_1_, LivingEntity p_212831_2_, long p_212831_3_)
- Overrides:
start
in classTask<LivingEntity>
-
isMatchingTarget
private boolean isMatchingTarget(LivingEntity p_220532_1_)
-
getVisibleEntities
private java.util.List<LivingEntity> getVisibleEntities(LivingEntity p_220530_1_)
-
-