Class TrackTargetGoal

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

public abstract class TrackTargetGoal
extends Goal
  • Field Details

    • mob

      protected final MobEntity mob
    • checkVisibility

      protected final boolean checkVisibility
    • checkCanNavigate

      private final boolean checkCanNavigate
    • canNavigateFlag

      private int canNavigateFlag
    • checkCanNavigateCooldown

      private int checkCanNavigateCooldown
    • timeWithoutVisibility

      private int timeWithoutVisibility
    • target

      protected LivingEntity target
    • maxTimeWithoutVisibility

      protected int maxTimeWithoutVisibility
  • Constructor Details

    • TrackTargetGoal

      public TrackTargetGoal​(MobEntity mob, boolean checkVisibility)
    • TrackTargetGoal

      public TrackTargetGoal​(MobEntity mob, boolean checkVisibility, boolean checkNavigable)
  • Method Details

    • shouldContinue

      public boolean shouldContinue()
      Overrides:
      shouldContinue in class Goal
    • getFollowRange

      protected double getFollowRange()
    • start

      public void start()
      Overrides:
      start in class Goal
    • stop

      public void stop()
      Overrides:
      stop in class Goal
    • canTrack

      protected boolean canTrack​(@Nullable LivingEntity target, TargetPredicate targetPredicate)
    • canNavigateToEntity

      private boolean canNavigateToEntity​(LivingEntity entity)
    • setMaxTimeWithoutVisibility

      public TrackTargetGoal setMaxTimeWithoutVisibility​(int time)