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 Object
  • Field Details

    • RANDOM

      private static final 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
  • Constructor Details

    • Sensor

      public Sensor(int p_i50301_1_)
    • Sensor

      public Sensor()
  • Method Details

    • 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 Set<MemoryModuleType<?>> requires()
    • isEntityTargetable

      protected static boolean isEntityTargetable(LivingEntity p_242316_0_, LivingEntity p_242316_1_)