Class VillagerHostilesSensor
java.lang.Object
net.minecraft.entity.ai.brain.sensor.Sensor<LivingEntity>
net.minecraft.entity.ai.brain.sensor.VillagerHostilesSensor
public class VillagerHostilesSensor extends Sensor<LivingEntity>
-
Field Summary
Fields Modifier and Type Field Description private static ImmutableMap<EntityType<?>,Float>SQUARED_DISTANCES_FOR_DANGER -
Constructor Summary
Constructors Constructor Description VillagerHostilesSensor() -
Method Summary
Modifier and Type Method Description private intcompareDistances(LivingEntity entity, LivingEntity hostile1, LivingEntity hostile2)private Optional<LivingEntity>getNearestHostile(LivingEntity entity)Set<MemoryModuleType<?>>getOutputMemoryModules()private Optional<List<LivingEntity>>getVisibleMobs(LivingEntity entity)private booleanisCloseEnoughForDanger(LivingEntity entity, LivingEntity hostile)private booleanisHostile(LivingEntity entity)protected voidsense(ServerWorld world, LivingEntity entity)Methods inherited from class net.minecraft.entity.ai.brain.sensor.Sensor
method_30954, tick
-
Field Details
-
SQUARED_DISTANCES_FOR_DANGER
-
-
Constructor Details
-
VillagerHostilesSensor
public VillagerHostilesSensor()
-
-
Method Details
-
getOutputMemoryModules
- Specified by:
getOutputMemoryModulesin classSensor<LivingEntity>
-
sense
- Specified by:
sensein classSensor<LivingEntity>
-
getNearestHostile
-
getVisibleMobs
-
compareDistances
-
isCloseEnoughForDanger
-
isHostile
-