Class NearestAttackableTargetGoal<T extends LivingEntity>

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TargetGoal
net.minecraft.entity.ai.goal.NearestAttackableTargetGoal<T>
Direct Known Subclasses:
BeeEntity.AttackPlayerGoal, EndermanEntity.FindPlayerGoal, FoxEntity.RevengeGoal, LlamaEntity.DefendTargetGoal, NearestAttackableTargetExpiringGoal, NonTamedTargetGoal, PolarBearEntity.AttackPlayerGoal, ShulkerEntity.AttackNearestGoal, ShulkerEntity.DefenseAttackGoal, SpiderEntity.TargetGoal, ToggleableNearestAttackableTargetGoal, VindicatorEntity.JohnnyAttackGoal

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

  • Constructor Details

    • NearestAttackableTargetGoal

      public NearestAttackableTargetGoal(MobEntity p_i50313_1_, Class<T> p_i50313_2_, boolean p_i50313_3_)
    • NearestAttackableTargetGoal

      public NearestAttackableTargetGoal(MobEntity p_i50314_1_, Class<T> p_i50314_2_, boolean p_i50314_3_, boolean p_i50314_4_)
    • NearestAttackableTargetGoal

      public NearestAttackableTargetGoal(MobEntity p_i50315_1_, Class<T> p_i50315_2_, int p_i50315_3_, boolean p_i50315_4_, boolean p_i50315_5_, @Nullable Predicate<LivingEntity> p_i50315_6_)
  • Method Details

    • canUse

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

      protected AxisAlignedBB getTargetSearchArea(double p_188511_1_)
    • findTarget

      protected void findTarget()
    • start

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

      public void setTarget(@Nullable LivingEntity p_234054_1_)