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 ccd
  • 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 Lccd;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 Lccd;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 Lccd;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 Lccd;c:Lbtl;
    • 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 Lccd;d:Lced;
  • 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> Lccd;<init>(Lbtn;Ljava/lang/Class;Z)V
    • ActiveTargetGoal

      public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, Predicate<LivingEntity> targetPredicate)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;ZLjava/util/function/Predicate;)V
      intermediary <init> Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;ZLjava/util/function/Predicate;)V
      official <init> Lccd;<init>(Lbtn;Ljava/lang/Class;ZLjava/util/function/Predicate;)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> Lccd;<init>(Lbtn;Ljava/lang/Class;ZZ)V
    • ActiveTargetGoal

      public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, int reciprocalChance, boolean checkVisibility, boolean checkCanNavigate, @Nullable @Nullable Predicate<LivingEntity> targetPredicate)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Ljava/lang/Class;IZZLjava/util/function/Predicate;)V
      intermediary <init> Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;IZZLjava/util/function/Predicate;)V
      official <init> Lccd;<init>(Lbtn;Ljava/lang/Class;IZZLjava/util/function/Predicate;)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 Lcak;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 Lccd;a(D)Lewr;
    • 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 Lccd;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 Lcak;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 Lccd;a(Lbtl;)V