Class TrackTargetGoal

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TrackTargetGoal
Direct Known Subclasses:
ActiveTargetGoal, AttackWithOwnerGoal, RevengeGoal, TrackIronGolemTargetGoal, TrackOwnerAttackerGoal, TraderLlamaEntity.DefendTraderGoal, VexEntity.TrackOwnerTargetGoal

public abstract class TrackTargetGoal extends Goal
A goal that maintains the target of a mob entity. If the goal stops, such as because the target is not valid, the target is removed from the owner mob.

Compared to other goals, this goal and its subclasses are added to the target than the regular goal selector, and should use the Goal.Control.TARGET control if it sets the owner's target.

Mappings:
Namespace Name
named net/minecraft/entity/ai/goal/TrackTargetGoal
intermediary net/minecraft/class_1405
official ccm
  • Field Details

    • UNSET

      private static final int UNSET
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named UNSET Lnet/minecraft/entity/ai/goal/TrackTargetGoal;UNSET:I
      intermediary field_30233 Lnet/minecraft/class_1405;field_30233:I
      official a Lccm;a:I
    • CAN_TRACK

      private static final int CAN_TRACK
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named CAN_TRACK Lnet/minecraft/entity/ai/goal/TrackTargetGoal;CAN_TRACK:I
      intermediary field_30234 Lnet/minecraft/class_1405;field_30234:I
      official b Lccm;b:I
    • CANNOT_TRACK

      private static final int CANNOT_TRACK
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named CANNOT_TRACK Lnet/minecraft/entity/ai/goal/TrackTargetGoal;CANNOT_TRACK:I
      intermediary field_30235 Lnet/minecraft/class_1405;field_30235:I
      official c Lccm;c:I
    • mob

      protected final MobEntity mob
      Mappings:
      Namespace Name Mixin selector
      named mob Lnet/minecraft/entity/ai/goal/TrackTargetGoal;mob:Lnet/minecraft/entity/mob/MobEntity;
      intermediary field_6660 Lnet/minecraft/class_1405;field_6660:Lnet/minecraft/class_1308;
      official e Lccm;e:Lbtp;
    • checkVisibility

      protected final boolean checkVisibility
      Mappings:
      Namespace Name Mixin selector
      named checkVisibility Lnet/minecraft/entity/ai/goal/TrackTargetGoal;checkVisibility:Z
      intermediary field_6658 Lnet/minecraft/class_1405;field_6658:Z
      official f Lccm;f:Z
    • checkCanNavigate

      private final boolean checkCanNavigate
      Mappings:
      Namespace Name Mixin selector
      named checkCanNavigate Lnet/minecraft/entity/ai/goal/TrackTargetGoal;checkCanNavigate:Z
      intermediary field_6663 Lnet/minecraft/class_1405;field_6663:Z
      official d Lccm;d:Z
    • canNavigateFlag

      private int canNavigateFlag
      Mappings:
      Namespace Name Mixin selector
      named canNavigateFlag Lnet/minecraft/entity/ai/goal/TrackTargetGoal;canNavigateFlag:I
      intermediary field_6662 Lnet/minecraft/class_1405;field_6662:I
      official i Lccm;i:I
    • checkCanNavigateCooldown

      private int checkCanNavigateCooldown
      Mappings:
      Namespace Name Mixin selector
      named checkCanNavigateCooldown Lnet/minecraft/entity/ai/goal/TrackTargetGoal;checkCanNavigateCooldown:I
      intermediary field_6661 Lnet/minecraft/class_1405;field_6661:I
      official j Lccm;j:I
    • timeWithoutVisibility

      private int timeWithoutVisibility
      Mappings:
      Namespace Name Mixin selector
      named timeWithoutVisibility Lnet/minecraft/entity/ai/goal/TrackTargetGoal;timeWithoutVisibility:I
      intermediary field_6659 Lnet/minecraft/class_1405;field_6659:I
      official k Lccm;k:I
    • target

      @Nullable protected @Nullable LivingEntity target
      Mappings:
      Namespace Name Mixin selector
      named target Lnet/minecraft/entity/ai/goal/TrackTargetGoal;target:Lnet/minecraft/entity/LivingEntity;
      intermediary field_6664 Lnet/minecraft/class_1405;field_6664:Lnet/minecraft/class_1309;
      official g Lccm;g:Lbtn;
    • maxTimeWithoutVisibility

      protected int maxTimeWithoutVisibility
      Mappings:
      Namespace Name Mixin selector
      named maxTimeWithoutVisibility Lnet/minecraft/entity/ai/goal/TrackTargetGoal;maxTimeWithoutVisibility:I
      intermediary field_6657 Lnet/minecraft/class_1405;field_6657:I
      official h Lccm;h:I
  • Constructor Details

    • TrackTargetGoal

      public TrackTargetGoal(MobEntity mob, boolean checkVisibility)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/TrackTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;Z)V
      intermediary <init> Lnet/minecraft/class_1405;<init>(Lnet/minecraft/class_1308;Z)V
      official <init> Lccm;<init>(Lbtp;Z)V
    • TrackTargetGoal

      public TrackTargetGoal(MobEntity mob, boolean checkVisibility, boolean checkNavigable)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/goal/TrackTargetGoal;<init>(Lnet/minecraft/entity/mob/MobEntity;ZZ)V
      intermediary <init> Lnet/minecraft/class_1405;<init>(Lnet/minecraft/class_1308;ZZ)V
      official <init> Lccm;<init>(Lbtp;ZZ)V
  • Method Details

    • shouldContinue

      public boolean shouldContinue()
      Overrides:
      shouldContinue in class Goal
      Mappings:
      Namespace Name Mixin selector
      named shouldContinue Lnet/minecraft/entity/ai/goal/Goal;shouldContinue()Z
      intermediary method_6266 Lnet/minecraft/class_1352;method_6266()Z
      official c Lcam;c()Z
    • getFollowRange

      protected double getFollowRange()
      Mappings:
      Namespace Name Mixin selector
      named getFollowRange Lnet/minecraft/entity/ai/goal/TrackTargetGoal;getFollowRange()D
      intermediary method_6326 Lnet/minecraft/class_1405;method_6326()D
      official l Lccm;l()D
    • start

      public void start()
      Overrides:
      start in class Goal
      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 Lcam;d()V
    • stop

      public void stop()
      Overrides:
      stop in class Goal
      Mappings:
      Namespace Name Mixin selector
      named stop Lnet/minecraft/entity/ai/goal/Goal;stop()V
      intermediary method_6270 Lnet/minecraft/class_1352;method_6270()V
      official e Lcam;e()V
    • canTrack

      protected boolean canTrack(@Nullable @Nullable LivingEntity target, TargetPredicate targetPredicate)
      Mappings:
      Namespace Name Mixin selector
      named canTrack Lnet/minecraft/entity/ai/goal/TrackTargetGoal;canTrack(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/ai/TargetPredicate;)Z
      intermediary method_6328 Lnet/minecraft/class_1405;method_6328(Lnet/minecraft/class_1309;Lnet/minecraft/class_4051;)Z
      official a Lccm;a(Lbtn;Lcef;)Z
    • canNavigateToEntity

      private boolean canNavigateToEntity(LivingEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named canNavigateToEntity Lnet/minecraft/entity/ai/goal/TrackTargetGoal;canNavigateToEntity(Lnet/minecraft/entity/LivingEntity;)Z
      intermediary method_6329 Lnet/minecraft/class_1405;method_6329(Lnet/minecraft/class_1309;)Z
      official a Lccm;a(Lbtn;)Z
    • setMaxTimeWithoutVisibility

      public TrackTargetGoal setMaxTimeWithoutVisibility(int time)
      Mappings:
      Namespace Name Mixin selector
      named setMaxTimeWithoutVisibility Lnet/minecraft/entity/ai/goal/TrackTargetGoal;setMaxTimeWithoutVisibility(I)Lnet/minecraft/entity/ai/goal/TrackTargetGoal;
      intermediary method_6330 Lnet/minecraft/class_1405;method_6330(I)Lnet/minecraft/class_1405;
      official c Lccm;c(I)Lccm;