Class Sensor<E extends LivingEntity>
- java.lang.Object
-
- net.minecraft.entity.ai.brain.sensor.Sensor<E>
-
- Direct Known Subclasses:
DummySensor
,GolemLastSeenSensor
,HoglinMobsSensor
,HurtBySensor
,MateSensor
,NearestBedSensor
,NearestLivingEntitiesSensor
,NearestPlayersSensor
,PiglinBruteSpecificSensor
,PiglinMobsSensor
,SecondaryPositionSensor
,VillagerBabiesSensor
,VillagerHostilesSensor
,WantedItemsSensor
public abstract class Sensor<E extends LivingEntity> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Random
RANDOM
private int
scanRate
private static EntityPredicate
TARGET_CONDITIONS
private static EntityPredicate
TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING
private long
timeToTick
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
doTick(ServerWorld p_212872_1_, E p_212872_2_)
protected static boolean
isEntityTargetable(LivingEntity p_242316_0_, LivingEntity p_242316_1_)
abstract java.util.Set<MemoryModuleType<?>>
requires()
void
tick(ServerWorld p_220973_1_, E p_220973_2_)
-
-
-
Field Detail
-
RANDOM
private static final java.util.Random RANDOM
-
TARGET_CONDITIONS
private static final EntityPredicate TARGET_CONDITIONS
-
TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING
private static final EntityPredicate TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING
-
scanRate
private final int scanRate
-
timeToTick
private long timeToTick
-
-
Method Detail
-
tick
public final void tick(ServerWorld p_220973_1_, E p_220973_2_)
-
doTick
protected abstract void doTick(ServerWorld p_212872_1_, E p_212872_2_)
-
requires
public abstract java.util.Set<MemoryModuleType<?>> requires()
-
isEntityTargetable
protected static boolean isEntityTargetable(LivingEntity p_242316_0_, LivingEntity p_242316_1_)
-
-