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
official bet
intermediary net/minecraft/class_1400
named net/minecraft/entity/ai/goal/ActiveTargetGoal
  • Field Details

    • DEFAULT_RECIPROCAL_CHANCE

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

      protected final Class<T extends LivingEntity> targetClass
      Mappings:
      Namespace Name Mixin selector
      official a Lbet;a:Ljava/lang/Class;
      intermediary field_6643 Lnet/minecraft/class_1400;field_6643:Ljava/lang/Class;
      named targetClass Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;targetClass: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
      official b Lbet;b:I
      intermediary field_6641 Lnet/minecraft/class_1400;field_6641:I
      named reciprocalChance Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;reciprocalChance:I
    • targetEntity

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

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

    • ActiveTargetGoal

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

      public ActiveTargetGoal(MobEntity mob, Class<T> targetClass, boolean checkVisibility, Predicate<LivingEntity> targetPredicate)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lbet;<init>(Laxj;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
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;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
      official <init> Lbet;<init>(Laxj;Ljava/lang/Class;ZZ)V
      intermediary <init> Lnet/minecraft/class_1400;<init>(Lnet/minecraft/class_1308;Ljava/lang/Class;ZZ)V
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;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
      official <init> Lbet;<init>(Laxj;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
      named <init> Lnet/minecraft/entity/ai/goal/ActiveTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;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
      official a Lbdb;a()Z
      intermediary method_6264 Lnet/minecraft/class_1352;method_6264()Z
      named canStart Lnet/minecraft/entity/ai/goal/Goal;canStart()Z
    • getSearchBox

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

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

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

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