Class NearestHostileSensor
java.lang.Object
net.minecraft.entity.ai.brain.sensor.Sensor<LivingEntity>
net.minecraft.entity.ai.brain.sensor.NearestHostileSensor
- Direct Known Subclasses:
AxolotlHostilesSensor,VillagerHostilesSensor
public abstract class NearestHostileSensor extends Sensor<LivingEntity>
-
Constructor Summary
Constructors Constructor Description NearestHostileSensor() -
Method Summary
Modifier and Type Method Description protected abstract Optional<LivingEntity>getNearestHostile(LivingEntity entity)Set<MemoryModuleType<?>>getOutputMemoryModules()protected Optional<List<LivingEntity>>getVisibleMobs(LivingEntity entity)protected abstract booleanisCloseEnoughForDanger(LivingEntity entity, LivingEntity target)protected voidsense(ServerWorld world, LivingEntity entity)Methods inherited from class net.minecraft.entity.ai.brain.sensor.Sensor
method_30954, tick
-
Constructor Details
-
NearestHostileSensor
public NearestHostileSensor()
-
-
Method Details
-
getNearestHostile
-
isCloseEnoughForDanger
-
getOutputMemoryModules
- Specified by:
getOutputMemoryModulesin classSensor<LivingEntity>
-
sense
- Specified by:
sensein classSensor<LivingEntity>
-
getVisibleMobs
-