Class TargetGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.target.TargetGoal
Direct Known Subclasses:
DefendVillageTargetGoal, HurtByTargetGoal, NearestAttackableTargetGoal, OwnerHurtByTargetGoal, OwnerHurtTargetGoal, TraderLlama.TraderLlamaDefendWanderingTraderGoal, Vex.VexCopyOwnerTargetGoal

public abstract class TargetGoal extends Goal
  • Field Details

    • EMPTY_REACH_CACHE

      private static final int EMPTY_REACH_CACHE
      See Also:
    • CAN_REACH_CACHE

      private static final int CAN_REACH_CACHE
      See Also:
    • CANT_REACH_CACHE

      private static final int CANT_REACH_CACHE
      See Also:
    • mob

      protected final Mob mob
    • mustSee

      protected final boolean mustSee
    • mustReach

      private final boolean mustReach
    • reachCache

      private int reachCache
    • reachCacheTime

      private int reachCacheTime
    • unseenTicks

      private int unseenTicks
    • targetMob

      @Nullable protected LivingEntity targetMob
    • unseenMemoryTicks

      protected int unseenMemoryTicks
  • Constructor Details

    • TargetGoal

      public TargetGoal(Mob p_26140_, boolean p_26141_)
    • TargetGoal

      public TargetGoal(Mob p_26143_, boolean p_26144_, boolean p_26145_)
  • 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_26151_, TargetingConditions p_26152_)
    • canReach

      private boolean canReach(LivingEntity p_26149_)
    • setUnseenMemoryTicks

      public TargetGoal setUnseenMemoryTicks(int p_26147_)