Class Memory.WalkingTarget

java.lang.Object
me.gamercoder215.mobchip.ai.memories.Memory.WalkingTarget
All Implemented Interfaces:
SpeedModifier
Enclosing interface:
Memory<T>

public static final class Memory.WalkingTarget extends Object implements SpeedModifier
Represents a Memory Type of Walking Target
  • Constructor Details

    • WalkingTarget

      public WalkingTarget(@NotNull @NotNull Location loc, float speedMod, int distance)
      Constructs a WalkingTarget.
      Parameters:
      loc - Location of target
      speedMod - Speed Modifier
      distance - Distance needed to stop walking
    • WalkingTarget

      public WalkingTarget(@NotNull @NotNull Location loc, int distance)
      Constructs a WalkingTarget with the default speed modifier.
      Parameters:
      loc - Location of target
      distance - Distance needed to stop walking
  • Method Details

    • getLocation

      @NotNull public @NotNull Location getLocation()
      Get the Location that this WalkingTarget is looking for.
      Returns:
      Location looking for
    • 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
    • getDistance

      public int getDistance()
      Fetches the current closest enough distance.
      Returns:
      Closest Enough Distance
    • setDistance

      public void setDistance(int distance)
      Sets the current closest enough distance.
      Parameters:
      distance - Distance to set
    • setSpeedModifier

      public void setSpeedModifier(double mod) throws IllegalArgumentException
      Description copied from interface: SpeedModifier
      Sets the Speed Modifier of this Pathfinder.
      Specified by:
      setSpeedModifier in interface SpeedModifier
      Parameters:
      mod - Modifier to set
      Throws:
      IllegalArgumentException - if greater than Float.MAX_VALUE