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 void
doTick
(ServerLevel pLevel, LivingEntity pEntity) protected abstract MemoryModuleType
<LivingEntity> private Optional
<LivingEntity> getNearestEntity
(LivingEntity pEntity) protected Optional
<NearestVisibleLivingEntities> getVisibleEntities
(LivingEntity pEntity) protected abstract boolean
isMatchingEntity
(LivingEntity pAttacker, LivingEntity pTarget) 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:
requires
in classSensor<LivingEntity>
-
doTick
- Specified by:
doTick
in classSensor<LivingEntity>
-
getNearestEntity
-
getVisibleEntities
-