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>
- Mappings:
Namespace Name official azv
intermediary net/minecraft/class_5759
named net/minecraft/entity/ai/brain/sensor/NearestHostileSensor
-
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 boolean
isCloseEnoughForDanger(LivingEntity entity, LivingEntity target)
protected void
sense(ServerWorld world, LivingEntity entity)
Methods inherited from class net.minecraft.entity.ai.brain.sensor.Sensor
testTargetPredicate, tick
-
Constructor Details
-
NearestHostileSensor
public NearestHostileSensor()
-
-
Method Details
-
getNearestHostile
- Mappings:
Namespace Name Mixin selector official a
Lazv;a(Lari;)Ljava/util/Optional;
intermediary method_19618
Lnet/minecraft/class_5759;method_19618(Lnet/minecraft/class_1309;)Ljava/util/Optional;
named getNearestHostile
Lnet/minecraft/entity/ai/brain/sensor/NearestHostileSensor;getNearestHostile(Lnet/minecraft/entity/LivingEntity;)Ljava/util/Optional;
-
isCloseEnoughForDanger
- Mappings:
Namespace Name Mixin selector official a
Lazv;a(Lari;Lari;)Z
intermediary method_19105
Lnet/minecraft/class_5759;method_19105(Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z
named isCloseEnoughForDanger
Lnet/minecraft/entity/ai/brain/sensor/NearestHostileSensor;isCloseEnoughForDanger(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
-
getOutputMemoryModules
- Specified by:
getOutputMemoryModules
in classSensor<LivingEntity>
- Mappings:
Namespace Name Mixin selector official a
Lbaf;a()Ljava/util/Set;
intermediary method_19099
Lnet/minecraft/class_4148;method_19099()Ljava/util/Set;
named getOutputMemoryModules
Lnet/minecraft/entity/ai/brain/sensor/Sensor;getOutputMemoryModules()Ljava/util/Set;
-
sense
- Specified by:
sense
in classSensor<LivingEntity>
- Mappings:
Namespace Name Mixin selector official a
Lbaf;a(Laav;Lari;)V
intermediary method_19101
Lnet/minecraft/class_4148;method_19101(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
named sense
Lnet/minecraft/entity/ai/brain/sensor/Sensor;sense(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)V
-
getVisibleMobs
- Mappings:
Namespace Name Mixin selector official b
Lazv;b(Lari;)Ljava/util/Optional;
intermediary method_33211
Lnet/minecraft/class_5759;method_33211(Lnet/minecraft/class_1309;)Ljava/util/Optional;
named getVisibleMobs
Lnet/minecraft/entity/ai/brain/sensor/NearestHostileSensor;getVisibleMobs(Lnet/minecraft/entity/LivingEntity;)Ljava/util/Optional;
-