Class Sensor<E extends LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.sensing.Sensor<E>
- Direct Known Subclasses:
AdultSensor
,DummySensor
,GolemSensor
,HoglinSpecificSensor
,HurtBySensor
,NearestBedSensor
,NearestItemSensor
,NearestLivingEntitySensor
,NearestVisibleLivingEntitySensor
,PiglinBruteSpecificSensor
,PiglinSpecificSensor
,PlayerSensor
,SecondaryPoiSensor
,TemptingSensor
,VillagerBabiesSensor
-
Field Summary
Modifier and TypeFieldDescriptionprivate static TargetingConditions
private static TargetingConditions
private static TargetingConditions
private static TargetingConditions
private static int
private static Random
private int
private static TargetingConditions
private static TargetingConditions
protected static int
private long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doTick(ServerLevel p_26801_, E p_26802_)
static boolean
isEntityAttackable(LivingEntity p_148313_, LivingEntity p_148314_)
static boolean
isEntityAttackableIgnoringLineOfSight(LivingEntity p_182378_, LivingEntity p_182379_)
protected static boolean
isEntityTargetable(LivingEntity p_26804_, LivingEntity p_26805_)
abstract Set<MemoryModuleType<?>>
requires()
void
tick(ServerLevel p_26807_, E p_26808_)
-
Field Details
-
RANDOM
-
DEFAULT_SCAN_RATE
private static final int DEFAULT_SCAN_RATE- See Also:
- Constant Field Values
-
TARGETING_RANGE
protected static final int TARGETING_RANGE- See Also:
- Constant Field Values
-
TARGET_CONDITIONS
-
TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING
-
ATTACK_TARGET_CONDITIONS
-
ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_TESTING
-
ATTACK_TARGET_CONDITIONS_IGNORE_LINE_OF_SIGHT
-
ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_AND_LINE_OF_SIGHT
private static final TargetingConditions ATTACK_TARGET_CONDITIONS_IGNORE_INVISIBILITY_AND_LINE_OF_SIGHT -
scanRate
private final int scanRate -
timeToTick
private long timeToTick
-
-
Constructor Details
-
Sensor
public Sensor(int p_26800_) -
Sensor
public Sensor()
-
-
Method Details
-
tick
-
doTick
-
requires
-
isEntityTargetable
-
isEntityAttackable
-
isEntityAttackableIgnoringLineOfSight
public static boolean isEntityAttackableIgnoringLineOfSight(LivingEntity p_182378_, LivingEntity p_182379_)
-