Class TargetGoal

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TargetGoal
Direct Known Subclasses:
DefendVillageTargetGoal, HurtByTargetGoal, NearestAttackableTargetGoal, OwnerHurtByTargetGoal, OwnerHurtTargetGoal, TraderLlamaEntity.FollowTraderGoal, VexEntity.CopyOwnerTargetGoal

public abstract class TargetGoal extends Goal
  • Field Details

    • mob

      protected final MobEntity mob
    • mustSee

      protected final boolean mustSee
    • mustReach

      private final boolean mustReach
    • reachCache

      private int reachCache
    • reachCacheTime

      private int reachCacheTime
    • unseenTicks

      private int unseenTicks
    • targetMob

      protected LivingEntity targetMob
    • unseenMemoryTicks

      protected int unseenMemoryTicks
  • Constructor Details

    • TargetGoal

      public TargetGoal(MobEntity p_i50308_1_, boolean p_i50308_2_)
    • TargetGoal

      public TargetGoal(MobEntity p_i50309_1_, boolean p_i50309_2_, boolean p_i50309_3_)
  • Method Details

    • canContinueToUse

      public boolean canContinueToUse()
      Overrides:
      canContinueToUse in class Goal
    • getFollowDistance

      protected double getFollowDistance()
    • start

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

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

      protected boolean canAttack(@Nullable LivingEntity p_220777_1_, EntityPredicate p_220777_2_)
    • canReach

      private boolean canReach(LivingEntity p_75295_1_)
    • setUnseenMemoryTicks

      public TargetGoal setUnseenMemoryTicks(int p_190882_1_)