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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoTick(ServerLevel level, LivingEntity body) protected abstract MemoryModuleType<LivingEntity> private Optional<LivingEntity> getNearestEntity(ServerLevel level, LivingEntity body) protected Optional<NearestVisibleLivingEntities> protected abstract booleanisMatchingEntity(ServerLevel level, LivingEntity body, LivingEntity mob) Set<MemoryModuleType<?>> requires()Methods inherited from class Sensor
isEntityAttackable, isEntityAttackableIgnoringLineOfSight, isEntityTargetable, randomlyDelayStart, rememberPositives, tick, wasEntityAttackableLastNTicks
-
Constructor Details
-
NearestVisibleLivingEntitySensor
public NearestVisibleLivingEntitySensor()
-
-
Method Details
-
isMatchingEntity
-
getMemoryToSet
-
requires
- Specified by:
requiresin classSensor<LivingEntity>
-
doTick
- Specified by:
doTickin classSensor<LivingEntity>
-
getNearestEntity
-
getVisibleEntities
-