Class NearestAttackableTargetGoal<T extends LivingEntity>

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.target.TargetGoal
net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal<T>
Direct Known Subclasses:
Bee.BeeBecomeAngryTargetGoal, EnderMan.EndermanLookForPlayerGoal, Fox.DefendTrustedTargetGoal, Llama.LlamaAttackWolfGoal, NearestAttackableWitchTargetGoal, NearestHealableRaiderTargetGoal, NonTameRandomTargetGoal, PolarBear.PolarBearAttackPlayersGoal, Shulker.ShulkerDefenseAttackGoal, Shulker.ShulkerNearestAttackGoal, Spider.SpiderTargetGoal, Vindicator.VindicatorJohnnyAttackGoal

public class NearestAttackableTargetGoal<T extends LivingEntity> extends TargetGoal
  • Field Details

  • Constructor Details

    • NearestAttackableTargetGoal

      public NearestAttackableTargetGoal(Mob p_26060_, Class<T> p_26061_, boolean p_26062_)
    • NearestAttackableTargetGoal

      public NearestAttackableTargetGoal(Mob p_199891_, Class<T> p_199892_, boolean p_199893_, Predicate<LivingEntity> p_199894_)
    • NearestAttackableTargetGoal

      public NearestAttackableTargetGoal(Mob p_26064_, Class<T> p_26065_, boolean p_26066_, boolean p_26067_)
    • NearestAttackableTargetGoal

      public NearestAttackableTargetGoal(Mob p_26053_, Class<T> p_26054_, int p_26055_, boolean p_26056_, boolean p_26057_, @Nullable Predicate<LivingEntity> p_26058_)
  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class Goal
    • getTargetSearchArea

      protected AABB getTargetSearchArea(double p_26069_)
    • findTarget

      protected void findTarget()
    • start

      public void start()
      Overrides:
      start in class TargetGoal
    • setTarget

      public void setTarget(@Nullable LivingEntity p_26071_)