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_316590_, BiPredicate<T, LivingEntity> p_316273_, Predicate<T> p_316373_, MemoryModuleType<Boolean> p_316764_, int p_316209_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkForMobsNearby
(T p_316143_) void
clearMemory
(T p_316737_) protected void
doTick
(ServerLevel p_316535_, T p_316183_) void
mobDetected
(T p_316813_) 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_316590_, BiPredicate<T, LivingEntity> p_316273_, Predicate<T> p_316373_, MemoryModuleType<Boolean> p_316764_, int p_316209_)
-
-
Method Details
-
doTick
- Specified by:
doTick
in classSensor<T extends LivingEntity>
-
requires
- Specified by:
requires
in classSensor<T extends LivingEntity>
-
checkForMobsNearby
-
mobDetected
-
clearMemory
-