Class Sensor<E extends LivingEntity>

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

public abstract class Sensor<E extends LivingEntity> extends Object
A sensor can update memories over time in a brain. The sensor's computation replaces that of individual tasks, so that it is more efficient than the goal system.
See Also:
Mappings:
Namespace Name
named net/minecraft/entity/ai/brain/sensor/Sensor
intermediary net/minecraft/class_4148
official cgp
  • Field Details

    • RANDOM

      private static final Random RANDOM
      Mappings:
      Namespace Name Mixin selector
      named RANDOM Lnet/minecraft/entity/ai/brain/sensor/Sensor;RANDOM:Lnet/minecraft/util/math/random/Random;
      intermediary field_19294 Lnet/minecraft/class_4148;field_19294:Lnet/minecraft/class_5819;
      official a Lcgp;a:Lbam;
    • DEFAULT_RUN_TIME

      private static final int DEFAULT_RUN_TIME
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_RUN_TIME Lnet/minecraft/entity/ai/brain/sensor/Sensor;DEFAULT_RUN_TIME:I
      intermediary field_30259 Lnet/minecraft/class_4148;field_30259:I
      official b Lcgp;b:I
    • BASE_MAX_DISTANCE

      private static final int BASE_MAX_DISTANCE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named BASE_MAX_DISTANCE Lnet/minecraft/entity/ai/brain/sensor/Sensor;BASE_MAX_DISTANCE:I
      intermediary field_30258 Lnet/minecraft/class_4148;field_30258:I
      official c Lcgp;c:I
    • TARGET_PREDICATE

      private static final TargetPredicate TARGET_PREDICATE
      Mappings:
      Namespace Name Mixin selector
      named TARGET_PREDICATE Lnet/minecraft/entity/ai/brain/sensor/Sensor;TARGET_PREDICATE:Lnet/minecraft/entity/ai/TargetPredicate;
      intermediary field_26630 Lnet/minecraft/class_4148;field_26630:Lnet/minecraft/class_4051;
      official d Lcgp;d:Lcgw;
    • TARGET_PREDICATE_IGNORE_DISTANCE_SCALING

      private static final TargetPredicate TARGET_PREDICATE_IGNORE_DISTANCE_SCALING
      Mappings:
      Namespace Name Mixin selector
      named TARGET_PREDICATE_IGNORE_DISTANCE_SCALING Lnet/minecraft/entity/ai/brain/sensor/Sensor;TARGET_PREDICATE_IGNORE_DISTANCE_SCALING:Lnet/minecraft/entity/ai/TargetPredicate;
      intermediary field_26631 Lnet/minecraft/class_4148;field_26631:Lnet/minecraft/class_4051;
      official e Lcgp;e:Lcgw;
    • ATTACKABLE_TARGET_PREDICATE

      private static final TargetPredicate ATTACKABLE_TARGET_PREDICATE
      Mappings:
      Namespace Name Mixin selector
      named ATTACKABLE_TARGET_PREDICATE Lnet/minecraft/entity/ai/brain/sensor/Sensor;ATTACKABLE_TARGET_PREDICATE:Lnet/minecraft/entity/ai/TargetPredicate;
      intermediary field_33762 Lnet/minecraft/class_4148;field_33762:Lnet/minecraft/class_4051;
      official f Lcgp;f:Lcgw;
    • ATTACKABLE_TARGET_PREDICATE_IGNORE_DISTANCE_SCALING

      private static final TargetPredicate ATTACKABLE_TARGET_PREDICATE_IGNORE_DISTANCE_SCALING
      Mappings:
      Namespace Name Mixin selector
      named ATTACKABLE_TARGET_PREDICATE_IGNORE_DISTANCE_SCALING Lnet/minecraft/entity/ai/brain/sensor/Sensor;ATTACKABLE_TARGET_PREDICATE_IGNORE_DISTANCE_SCALING:Lnet/minecraft/entity/ai/TargetPredicate;
      intermediary field_33763 Lnet/minecraft/class_4148;field_33763:Lnet/minecraft/class_4051;
      official g Lcgp;g:Lcgw;
    • ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY

      private static final TargetPredicate ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY
      Mappings:
      Namespace Name Mixin selector
      named ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY Lnet/minecraft/entity/ai/brain/sensor/Sensor;ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY:Lnet/minecraft/entity/ai/TargetPredicate;
      intermediary field_34050 Lnet/minecraft/class_4148;field_34050:Lnet/minecraft/class_4051;
      official h Lcgp;h:Lcgw;
    • ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY_OR_DISTANCE_SCALING

      private static final TargetPredicate ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY_OR_DISTANCE_SCALING
      Mappings:
      Namespace Name Mixin selector
      named ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY_OR_DISTANCE_SCALING Lnet/minecraft/entity/ai/brain/sensor/Sensor;ATTACKABLE_TARGET_PREDICATE_IGNORE_VISIBILITY_OR_DISTANCE_SCALING:Lnet/minecraft/entity/ai/TargetPredicate;
      intermediary field_34051 Lnet/minecraft/class_4148;field_34051:Lnet/minecraft/class_4051;
      official i Lcgp;i:Lcgw;
    • senseInterval

      private final int senseInterval
      Mappings:
      Namespace Name Mixin selector
      named senseInterval Lnet/minecraft/entity/ai/brain/sensor/Sensor;senseInterval:I
      intermediary field_18464 Lnet/minecraft/class_4148;field_18464:I
      official j Lcgp;j:I
    • lastSenseTime

      private long lastSenseTime
      Mappings:
      Namespace Name Mixin selector
      named lastSenseTime Lnet/minecraft/entity/ai/brain/sensor/Sensor;lastSenseTime:J
      intermediary field_18463 Lnet/minecraft/class_4148;field_18463:J
      official k Lcgp;k:J
  • Constructor Details

    • Sensor

      public Sensor(int senseInterval)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/brain/sensor/Sensor;<init>(I)V
      intermediary <init> Lnet/minecraft/class_4148;<init>(I)V
      official <init> Lcgp;<init>(I)V
    • Sensor

      public Sensor()
  • Method Details

    • tick

      public final void tick(ServerWorld world, E entity)
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/ai/brain/sensor/Sensor;tick(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_19100 Lnet/minecraft/class_4148;method_19100(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
      official b Lcgp;b(Lash;Lbwf;)V
    • updateRange

      private void updateRange(E entity)
      Mappings:
      Namespace Name Mixin selector
      named updateRange Lnet/minecraft/entity/ai/brain/sensor/Sensor;updateRange(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_61444 Lnet/minecraft/class_4148;method_61444(Lnet/minecraft/class_1309;)V
      official a Lcgp;a(Lbwf;)V
    • sense

      protected abstract void sense(ServerWorld world, E entity)
      Mappings:
      Namespace Name Mixin selector
      named sense Lnet/minecraft/entity/ai/brain/sensor/Sensor;sense(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_19101 Lnet/minecraft/class_4148;method_19101(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;)V
      official a Lcgp;a(Lash;Lbwf;)V
    • getOutputMemoryModules

      public abstract Set<MemoryModuleType<?>> getOutputMemoryModules()
      Mappings:
      Namespace Name Mixin selector
      named getOutputMemoryModules Lnet/minecraft/entity/ai/brain/sensor/Sensor;getOutputMemoryModules()Ljava/util/Set;
      intermediary method_19099 Lnet/minecraft/class_4148;method_19099()Ljava/util/Set;
      official a Lcgp;a()Ljava/util/Set;
    • testTargetPredicate

      public static boolean testTargetPredicate(ServerWorld world, LivingEntity entity, LivingEntity target)
      Mappings:
      Namespace Name Mixin selector
      named testTargetPredicate Lnet/minecraft/entity/ai/brain/sensor/Sensor;testTargetPredicate(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_30954 Lnet/minecraft/class_4148;method_30954(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z
      official b Lcgp;b(Lash;Lbwf;Lbwf;)Z
    • testAttackableTargetPredicate

      public static boolean testAttackableTargetPredicate(ServerWorld world, LivingEntity entity, LivingEntity target)
      Mappings:
      Namespace Name Mixin selector
      named testAttackableTargetPredicate Lnet/minecraft/entity/ai/brain/sensor/Sensor;testAttackableTargetPredicate(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_36982 Lnet/minecraft/class_4148;method_36982(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z
      official c Lcgp;c(Lash;Lbwf;Lbwf;)Z
    • hasTargetBeenAttackableRecently

      public static BiPredicate<ServerWorld,LivingEntity> hasTargetBeenAttackableRecently(LivingEntity entity, int ticks)
      Mappings:
      Namespace Name Mixin selector
      named hasTargetBeenAttackableRecently Lnet/minecraft/entity/ai/brain/sensor/Sensor;hasTargetBeenAttackableRecently(Lnet/minecraft/entity/LivingEntity;I)Ljava/util/function/BiPredicate;
      intermediary method_61445 Lnet/minecraft/class_4148;method_61445(Lnet/minecraft/class_1309;I)Ljava/util/function/BiPredicate;
      official a Lcgp;a(Lbwf;I)Ljava/util/function/BiPredicate;
    • testAttackableTargetPredicateIgnoreVisibility

      public static boolean testAttackableTargetPredicateIgnoreVisibility(ServerWorld world, LivingEntity entity, LivingEntity target)
      Mappings:
      Namespace Name Mixin selector
      named testAttackableTargetPredicateIgnoreVisibility Lnet/minecraft/entity/ai/brain/sensor/Sensor;testAttackableTargetPredicateIgnoreVisibility(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_37456 Lnet/minecraft/class_4148;method_37456(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1309;)Z
      official d Lcgp;d(Lash;Lbwf;Lbwf;)Z
    • hasPredicatePassedRecently

      static <T, U> BiPredicate<T,U> hasPredicatePassedRecently(int times, BiPredicate<T,U> predicate)
      Mappings:
      Namespace Name Mixin selector
      named hasPredicatePassedRecently Lnet/minecraft/entity/ai/brain/sensor/Sensor;hasPredicatePassedRecently(ILjava/util/function/BiPredicate;)Ljava/util/function/BiPredicate;
      intermediary method_61443 Lnet/minecraft/class_4148;method_61443(ILjava/util/function/BiPredicate;)Ljava/util/function/BiPredicate;
      official a Lcgp;a(ILjava/util/function/BiPredicate;)Ljava/util/function/BiPredicate;