Class PathfinderRangedBowAttack

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

public final class PathfinderRangedBowAttack extends Pathfinder implements SpeedModifier, Ranged, Repeated
Represents a Pathfinder for Any Ranged Monster to shoot arrows from a bow
  • Constructor Details

    • PathfinderRangedBowAttack

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

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

      public PathfinderRangedBowAttack(@NotNull @NotNull ProjectileSource m, double speedMod, float range, int interval) throws IllegalArgumentException
      Constructs a PathfinderRangedBowAttack.
      Parameters:
      m - Skeleton to use
      speedMod - Speed Modifier while attacking
      range - Range of attack
      interval - Interval of attack, in ticks
      Throws:
      IllegalArgumentException - if interval is less than 0
  • Method Details

    • 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
    • getInterval

      public int getInterval()
      Description copied from interface: Repeated
      Gets the repeating interval, in ticks
      Specified by:
      getInterval in interface Repeated
      Returns:
      Interval
    • setInterval

      public void setInterval(int interval)
      Description copied from interface: Repeated
      Sets the repeating interval, in ticks
      Specified by:
      setInterval in interface Repeated
      Parameters:
      interval - Interval
    • 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