Class PathfinderNearestAttackableTarget<T extends LivingEntity>

java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.target.TargetPathfinder
me.gamercoder215.mobchip.ai.goal.target.PathfinderNearestAttackableTarget<T>
Type Parameters:
T - Type of Target to look for
All Implemented Interfaces:
Conditional<LivingEntity>, PathfinderInfo, Repeated, Filtering<T>, Targeting
Direct Known Subclasses:
PathfinderNearestAttackableTargetRaider, PathfinderNearestHealableRaider, PathfinderWildTarget

public class PathfinderNearestAttackableTarget<T extends LivingEntity> extends TargetPathfinder implements Filtering<T>, Conditional<LivingEntity>, Repeated
Represents a Pathfinder to target a specific type of Entity
  • Constructor Details

    • PathfinderNearestAttackableTarget

      public PathfinderNearestAttackableTarget(@NotNull @NotNull Mob m, @NotNull @NotNull Class<T> filter) throws IllegalArgumentException
      Constructs a PathfinderNearestAttackableTarget with a default interval of 10.
      Parameters:
      m - Mob to use
      filter - Class of entity to find
      Throws:
      IllegalArgumentException - if class is null
    • PathfinderNearestAttackableTarget

      public PathfinderNearestAttackableTarget(@NotNull @NotNull Mob m, @NotNull @NotNull Class<T> filter, int interval) throws IllegalArgumentException
      Constructs a PathfinderNearestAttackableTarget with see and reach set to true.
      Parameters:
      m - Mob to use
      filter - Class of entity to find
      interval - Interval of attack, in ticks
      Throws:
      IllegalArgumentException - if class is null
    • PathfinderNearestAttackableTarget

      public PathfinderNearestAttackableTarget(@NotNull @NotNull Mob m, @NotNull @NotNull Class<T> filter, int interval, boolean mustSee, boolean reach) throws IllegalArgumentException
      Constructs a PathfinderNearestAttackableTarget with no conditions.
      Parameters:
      m - Mob to use
      filter - Class of entity to find
      interval - Interval of attack, in ticks
      mustSee - Whether entity must see target
      reach - Whether entity must reach target
      Throws:
      IllegalArgumentException - if class is null
    • PathfinderNearestAttackableTarget

      public PathfinderNearestAttackableTarget(@NotNull @NotNull Mob m, @NotNull @NotNull Class<T> filter, int interval, boolean mustSee, boolean reach, @Nullable @Nullable Predicate<LivingEntity> conditions) throws IllegalArgumentException
      Constructs a PathfinderNearestAttackableTarget.
      Parameters:
      m - Mob to use
      filter - Class of entity to find
      interval - Interval of attack, in ticks
      mustSee - Whether entity must see target
      reach - Whether entity must reach target
      conditions - Conditions needed to attack
      Throws:
      IllegalArgumentException - if filter is null
  • Method Details