Class PathfinderRandomStrollLand

All Implemented Interfaces:
PathfinderInfo, Repeated, Probable, SpeedModifier

public final class PathfinderRandomStrollLand extends PathfinderRandomStroll implements Probable
Represents a Pathfinder to randomly stroll only on land.
  • Field Details

    • DEFAULT_PROBABILITY

      public static final float DEFAULT_PROBABILITY
      The default probability to stroll.
      See Also:
  • Constructor Details

    • PathfinderRandomStrollLand

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

      public PathfinderRandomStrollLand(@NotNull @NotNull Creature c, double speedMod)
      Constructs a PathfinderRandomStrollLand with DEFAULT_PROBABILITY.
      Parameters:
      c - Creature to use
      speedMod - Speed Modifier while strolling
    • PathfinderRandomStrollLand

      public PathfinderRandomStrollLand(@NotNull @NotNull Creature c, double speedMod, float probability)
      Constructs a PathfinderRandomStrollLand
      Parameters:
      c - Creature to use
      speedMod - Speed Modifier while strolling
      probability - probability (between 0.0 - 1.0) of initiating a stroll
  • Method Details

    • getProbability

      public float getProbability()
      Description copied from interface: Probable
      Get the current probability of this Pathfinder.
      Specified by:
      getProbability in interface Probable
      Returns:
      Probability of this Pathfinder happening
    • setProbability

      public void setProbability(float prob)
      Description copied from interface: Probable
      Sets the current probability of this Pathfinder.
      Specified by:
      setProbability in interface Probable
      Parameters:
      prob - Probability to set
    • getInternalName

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