Class Sensor<E extends LivingEntity>

java.lang.Object
net.minecraft.entity.ai.brain.sensor.Sensor<E>
Direct Known Subclasses:
DummySensor, GolemLastSeenSensor, HoglinSpecificSensor, HurtBySensor, NearestBedSensor, NearestItemsSensor, NearestLivingEntitiesSensor, NearestPlayersSensor, NearestVisibleAdultSensor, PiglinBruteSpecificSensor, PiglinSpecificSensor, SecondaryPointsOfInterestSensor, VillagerBabiesSensor, VillagerHostilesSensor

public abstract class Sensor<E extends LivingEntity>
extends Object
  • Field Details

    • RANDOM

      private static final Random RANDOM
    • field_26630

      private static final TargetPredicate field_26630
    • field_26631

      private static final TargetPredicate field_26631
    • senseInterval

      private final int senseInterval
    • lastSenseTime

      private long lastSenseTime
  • Constructor Details

    • Sensor

      public Sensor​(int senseInterval)
    • Sensor

      public Sensor()
  • Method Details

    • tick

      public final void tick​(ServerWorld serverWorld, E entity)
    • sense

      protected abstract void sense​(ServerWorld world, E entity)
    • getOutputMemoryModules

      public abstract Set<MemoryModuleType<?>> getOutputMemoryModules()
    • method_30954

      protected static boolean method_30954​(LivingEntity livingEntity, LivingEntity livingEntity2)