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 SummaryFields inherited from class net.minecraft.world.entity.ai.sensing.SensorTARGETING_RANGE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.SensorisEntityAttackable, isEntityAttackableIgnoringLineOfSight, isEntityTargetable, tick
- 
Constructor Details- 
NearestVisibleLivingEntitySensorpublic NearestVisibleLivingEntitySensor()
 
- 
- 
Method Details- 
isMatchingEntity
- 
getMemory
- 
requires- Specified by:
- requiresin class- Sensor<LivingEntity>
 
- 
doTick- Specified by:
- doTickin class- Sensor<LivingEntity>
 
- 
getNearestEntity
- 
getVisibleEntities
 
-