Class VillagerHostilesSensor
java.lang.Object
net.minecraft.entity.ai.brain.sensor.Sensor<LivingEntity>
net.minecraft.entity.ai.brain.sensor.VillagerHostilesSensor
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.google.common.collect.ImmutableMap<EntityType<?>,
Float> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate int
compareMobDistance
(LivingEntity p_220983_1_, LivingEntity p_220983_2_, LivingEntity p_220983_3_) protected void
doTick
(ServerWorld p_212872_1_, LivingEntity p_212872_2_) private Optional<LivingEntity>
getNearestHostile
(LivingEntity p_220989_1_) private Optional<List<LivingEntity>>
getVisibleEntities
(LivingEntity p_220990_1_) private boolean
isClose
(LivingEntity p_220987_1_, LivingEntity p_220987_2_) private boolean
isHostile
(LivingEntity p_220988_1_) Set<MemoryModuleType<?>>
requires()
Methods inherited from class net.minecraft.entity.ai.brain.sensor.Sensor
isEntityTargetable, tick
-
Field Details
-
ACCEPTABLE_DISTANCE_FROM_HOSTILES
private static final com.google.common.collect.ImmutableMap<EntityType<?>,Float> ACCEPTABLE_DISTANCE_FROM_HOSTILES
-
-
Constructor Details
-
VillagerHostilesSensor
public VillagerHostilesSensor()
-
-
Method Details
-
requires
- Specified by:
requires
in classSensor<LivingEntity>
-
doTick
- Specified by:
doTick
in classSensor<LivingEntity>
-
getNearestHostile
-
getVisibleEntities
-
compareMobDistance
private int compareMobDistance(LivingEntity p_220983_1_, LivingEntity p_220983_2_, LivingEntity p_220983_3_) -
isClose
-
isHostile
-