Class PathfinderRangedAttack

java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.PathfinderRangedAttack
All Implemented Interfaces:
PathfinderInfo, Ranged, SpeedModifier

public final class PathfinderRangedAttack extends Pathfinder implements SpeedModifier, Ranged
Represents a Pathfinder for a ranged entity to shoot ranged projectiles
  • Constructor Details

    • PathfinderRangedAttack

      public PathfinderRangedAttack(@NotNull @NotNull ProjectileSource m, double speedMod)
      Constructs a PathfinderRangedAttack with the default attack range.
      Parameters:
      m - ProjectileSource to use
      speedMod - Speed Modifier while attacking
    • PathfinderRangedAttack

      public PathfinderRangedAttack(@NotNull @NotNull ProjectileSource m, double speedMod, float range)
      Constructs a PathfinderRangedAttack with the default interval.
      Parameters:
      m - Skeleton to use
      speedMod - Speed Modifier while attacking
      range - Range of attack
    • PathfinderRangedAttack

      public PathfinderRangedAttack(@NotNull @NotNull ProjectileSource m, double speedMod, float range, int interval)
      Constructs a PathfinderRangedAttack with the max and min intervals the same.
      Parameters:
      m - ProjectileSource to use
      speedMod - Speed Modifier while attacking
      range - Range of attack
      interval - Interval of attack, in ticks
    • PathfinderRangedAttack

      public PathfinderRangedAttack(@NotNull @NotNull ProjectileSource m, double speedMod, float range, int attackMin, int attackMax)
      Constructs a PathfinderRangedAttack.
      Parameters:
      m - Skeleton to use
      speedMod - Speed Modifier while attacking
      range - Range of attack
      attackMin - Minimum Interval of attack, in ticks
      attackMax - Maximum Interval of attack, in ticks
  • Method Details

    • getMinAttackInterval

      public int getMinAttackInterval()
      Fetches the minimum attack interval, in ticks.
      Returns:
      Minimum Attack Interval
    • getMaxAttackInterval

      public int getMaxAttackInterval()
      Fetches the maximum attack interval, in ticks.
      Returns:
      Maximum Attack Interval
    • setMinAttackInterval

      public void setMinAttackInterval(int min)
      Sets the minimum attack interval, in ticks.
      Parameters:
      min - minimum attack interval
    • setMaxAttackInterval

      public void setMaxAttackInterval(int max)
      Sets the maximum attack interval, in ticks.
      Parameters:
      max - maximum attack interval
    • getRange

      public float getRange()
      Description copied from interface: Ranged
      Gets the current Range.
      Specified by:
      getRange in interface Ranged
      Returns:
      Current Range
    • setRange

      public void setRange(float range)
      Description copied from interface: Ranged
      Sets the current Range.
      Specified by:
      setRange in interface Ranged
      Parameters:
      range - Range to set
    • getSpeedModifier

      public double getSpeedModifier()
      Description copied from interface: SpeedModifier
      Get the Speed Modifier of this Pathfinder.
      Specified by:
      getSpeedModifier in interface SpeedModifier
      Returns:
      Speed Modifier
    • setSpeedModifier

      public void setSpeedModifier(double mod)
      Description copied from interface: SpeedModifier
      Sets the Speed Modifier of this Pathfinder.
      Specified by:
      setSpeedModifier in interface SpeedModifier
      Parameters:
      mod - Modifier to set
    • getFlags

      Description copied from class: Pathfinder

      Fetches an Array of Flags that this Pathfinder has.

      Specified by:
      getFlags in class Pathfinder
      Returns:
      Array of Pathfinder Flags
    • getInternalName

      public String getInternalName()
      Description copied from interface: PathfinderInfo
      Returns the NMS Internal Name.
      Specified by:
      getInternalName in interface PathfinderInfo
      Returns:
      Internal Name