Class NearestVisibleLivingEntitySensor
java.lang.Object
net.minecraft.world.entity.ai.sensing.Sensor<LivingEntity>
net.minecraft.world.entity.ai.sensing.NearestVisibleLivingEntitySensor
- Direct Known Subclasses:
AxolotlAttackablesSensor,FrogAttackablesSensor,VillagerHostilesSensor
-
Field Summary
Fields inherited from class net.minecraft.world.entity.ai.sensing.Sensor
TARGETING_RANGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoTick(ServerLevel p_148288_, LivingEntity p_148289_) protected abstract MemoryModuleType<LivingEntity> private Optional<LivingEntity> getNearestEntity(LivingEntity p_148298_) protected Optional<NearestVisibleLivingEntities> getVisibleEntities(LivingEntity p_148291_) protected abstract booleanisMatchingEntity(LivingEntity p_148292_, LivingEntity p_148293_) Set<MemoryModuleType<?>> requires()Methods inherited from class net.minecraft.world.entity.ai.sensing.Sensor
isEntityAttackable, isEntityAttackableIgnoringLineOfSight, isEntityTargetable, tick
-
Constructor Details
-
NearestVisibleLivingEntitySensor
public NearestVisibleLivingEntitySensor()
-
-
Method Details
-
isMatchingEntity
-
getMemory
-
requires
- Specified by:
requiresin classSensor<LivingEntity>
-
doTick
- Specified by:
doTickin classSensor<LivingEntity>
-
getNearestEntity
-
getVisibleEntities
-