Class MobSensor<T extends LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.sensing.Sensor<T>
net.minecraft.world.entity.ai.sensing.MobSensor<T>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final BiPredicate
<T, LivingEntity> private final MemoryModuleType
<Boolean> Fields inherited from class net.minecraft.world.entity.ai.sensing.Sensor
TARGETING_RANGE
-
Constructor Summary
ConstructorDescriptionMobSensor
(int p_333366_, BiPredicate<T, LivingEntity> p_329126_, Predicate<T> p_334546_, MemoryModuleType<Boolean> p_334716_, int p_331675_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkForMobsNearby
(T p_333520_) void
clearMemory
(T p_336340_) protected void
doTick
(ServerLevel p_332587_, T p_336316_) void
mobDetected
(T p_332120_) Set
<MemoryModuleType<?>> requires()
Methods inherited from class net.minecraft.world.entity.ai.sensing.Sensor
isEntityAttackable, isEntityAttackableIgnoringLineOfSight, isEntityTargetable, tick
-
Field Details
-
mobTest
-
readyTest
-
toSet
-
memoryTimeToLive
private final int memoryTimeToLive
-
-
Constructor Details
-
MobSensor
public MobSensor(int p_333366_, BiPredicate<T, LivingEntity> p_329126_, Predicate<T> p_334546_, MemoryModuleType<Boolean> p_334716_, int p_331675_)
-
-
Method Details
-
doTick
- Specified by:
doTick
in classSensor<T extends LivingEntity>
-
requires
- Specified by:
requires
in classSensor<T extends LivingEntity>
-
checkForMobsNearby
-
mobDetected
-
clearMemory
-