Class ActiveTargetGoal<T extends LivingEntity>

Direct Known Subclasses:
BeeEntity.StingTargetGoal, DisableableFollowTargetGoal, EndermanEntity.TeleportTowardsPlayerGoal, FoxEntity.DefendFriendGoal, LlamaEntity.ChaseWolvesGoal, PolarBearEntity.ProtectBabiesGoal, RaidGoal, ShulkerEntity.TargetOtherTeamGoal, ShulkerEntity.TargetPlayerGoal, SpiderEntity.TargetGoal, UntamedActiveTargetGoal, VindicatorEntity.TargetGoal

public class ActiveTargetGoal<T extends LivingEntity> extends TrackTargetGoal
A target goal that finds a target by entity class when the goal starts.
Mappings:
Namespace Name
named net/minecraft/entity/ai/goal/ActiveTargetGoal
intermediary net/minecraft/class_1400
official cew
  • Field Details

    • DEFAULT_RECIPROCAL_CHANCE

      private static final int DEFAULT_RECIPROCAL_CHANCE
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_RECIPROCAL_CHANCE Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;DEFAULT_RECIPROCAL_CHANCE:I
      intermediary field_36304 Lnet/minecraft/class_1400;field_36304:I
      official i Lcew;i:I
    • targetClass

      protected final Class<T extends LivingEntity> targetClass
      Mappings:
      Namespace Name Mixin selector
      named targetClass Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetClass:Ljava/lang/Class;
      intermediary field_6643 Lnet/minecraft/class_1400;field_6643:Ljava/lang/Class;
      official a Lcew;a:Ljava/lang/Class;
    • reciprocalChance

      protected final int reciprocalChance
      The reciprocal of chance to actually search for a target on every tick when this goal is not started. This is also the average number of ticks between each search (as in a poisson distribution).
      Mappings:
      Namespace Name Mixin selector
      named reciprocalChance Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;reciprocalChance:I
      intermediary field_6641 Lnet/minecraft/class_1400;field_6641:I
      official b Lcew;b:I
    • targetEntity

      @Nullable protected @Nullable LivingEntity targetEntity
      Mappings:
      Namespace Name Mixin selector
      named targetEntity Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetEntity:Lnet/minecraft/entity/LivingEntity;
      intermediary field_6644 Lnet/minecraft/class_1400;field_6644:Lnet/minecraft/class_1309;
      official c Lcew;c:Lbwf;
    • targetPredicate

      protected TargetPredicate targetPredicate
      Mappings:
      Namespace Name Mixin selector
      named targetPredicate Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetPredicate:Lnet/minecraft/entity/ai/TargetPredicate;
      intermediary field_6642 Lnet/minecraft/class_1400;field_6642:Lnet/minecraft/class_4051;
      official d Lcew;d:Lcgw;
  • Constructor Details

    • ActiveTargetGoal

      public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;Z)V
      intermediary <init> Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;Z)V
      official <init> Lcew;<init>(Lbwh;Ljava/lang/Class;Z)V
    • ActiveTargetGoal

      public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, TargetPredicate.EntityPredicate predicate)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;ZLnet/minecraft/entity/ai/TargetPredicate$EntityPredicate;)V
      intermediary <init> Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;ZLnet/minecraft/class_4051$class_10254;)V
      official <init> Lcew;<init>(Lbwh;Ljava/lang/Class;ZLcgw$a;)V
    • ActiveTargetGoal

      public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, boolean checkCanNavigate)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;ZZ)V
      intermediary <init> Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;ZZ)V
      official <init> Lcew;<init>(Lbwh;Ljava/lang/Class;ZZ)V
    • ActiveTargetGoal

      public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, @Nullable TargetPredicate.EntityPredicate targetPredicate)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;IZZLnet/minecraft/entity/ai/TargetPredicate$EntityPredicate;)V
      intermediary <init> Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;IZZLnet/minecraft/class_4051$class_10254;)V
      official <init> Lcew;<init>(Lbwh;Ljava/lang/Class;IZZLcgw$a;)V
  • Method Details

    • canStart

      public boolean canStart()
      Specified by:
      canStart in class Goal
      Mappings:
      Namespace Name Mixin selector
      named canStart Lnet/minecraft/entity/ai/goal/Goal;canStart()Z
      intermediary method_6264 Lnet/minecraft/class_1352;method_6264()Z
      official b Lcdd;b()Z
    • getSearchBox

      protected Box getSearchBox(double distance)
      Mappings:
      Namespace Name Mixin selector
      named getSearchBox Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;getSearchBox(D)Lnet/minecraft/util/math/Box;
      intermediary method_6321 Lnet/minecraft/class_1400;method_6321(D)Lnet/minecraft/class_238;
      official a Lcew;a(D)Lfbs;
    • findClosestTarget

      protected void findClosestTarget()
      Mappings:
      Namespace Name Mixin selector
      named findClosestTarget Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;findClosestTarget()V
      intermediary method_18415 Lnet/minecraft/class_1400;method_18415()V
      official h Lcew;h()V
    • start

      public void start()
      Overrides:
      start in class TrackTargetGoal
      Mappings:
      Namespace Name Mixin selector
      named start Lnet/minecraft/entity/ai/goal/Goal;start()V
      intermediary method_6269 Lnet/minecraft/class_1352;method_6269()V
      official d Lcdd;d()V
    • setTargetEntity

      public void setTargetEntity(@Nullable @Nullable LivingEntity targetEntity)
      Mappings:
      Namespace Name Mixin selector
      named setTargetEntity Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;setTargetEntity(Lnet/minecraft/entity/LivingEntity;)V
      intermediary method_24632 Lnet/minecraft/class_1400;method_24632(Lnet/minecraft/class_1309;)V
      official a Lcew;a(Lbwf;)V
    • getAndUpdateTargetPredicate

      private TargetPredicate getAndUpdateTargetPredicate()
      Mappings:
      Namespace Name Mixin selector
      named getAndUpdateTargetPredicate Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;getAndUpdateTargetPredicate()Lnet/minecraft/entity/ai/TargetPredicate;
      intermediary method_61438 Lnet/minecraft/class_1400;method_61438()Lnet/minecraft/class_4051;
      official i Lcew;i()Lcgw;