Class PathfinderRandomStroll

java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.PathfinderRandomStroll
All Implemented Interfaces:
PathfinderInfo, Repeated, SpeedModifier
Direct Known Subclasses:
PathfinderRandomStrollFlying, PathfinderRandomStrollInVillage, PathfinderRandomStrollLand, PathfinderRandomStrollToVillage, PathfinderRandomSwim

public class PathfinderRandomStroll extends Pathfinder implements SpeedModifier, Repeated
Represents a Pathfinder for Creatures to randomly stroll
  • Constructor Details

    • PathfinderRandomStroll

      public PathfinderRandomStroll(@NotNull @NotNull Creature c)
      Constructs a PathfinderRandomStroll with no speed modifier.
      Parameters:
      c - Creature to use
    • PathfinderRandomStroll

      public PathfinderRandomStroll(@NotNull @NotNull Creature c, double speedMod)
      Constructs a PathfinderRandomStroll with a default interval of 120 ticks.
      Parameters:
      c - Creature to use
      speedMod - Speed Modifier while strolling
    • PathfinderRandomStroll

      public PathfinderRandomStroll(@NotNull @NotNull Creature c, double speedMod, int interval) throws IllegalArgumentException
      Constructs a PathfinderRandomStroll.
      Parameters:
      c - Creature to use
      speedMod - Speed Modifier while strolling
      interval - Strolling Speed Interval, in ticks
      Throws:
      IllegalArgumentException - if interval is less than 0
  • Method Details

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