Class Memory.WalkingTarget
java.lang.Object
me.gamercoder215.mobchip.ai.memories.Memory.WalkingTarget
- All Implemented Interfaces:
SpeedModifier
Represents a Memory Type of Walking Target
-
Field Summary
Fields inherited from interface me.gamercoder215.mobchip.ai.SpeedModifier
DEFAULT_SPEED_MODIFIER
-
Constructor Summary
ConstructorsConstructorDescriptionWalkingTarget
(@NotNull Location loc, float speedMod, int distance) Constructs a WalkingTarget.WalkingTarget
(@NotNull Location loc, int distance) Constructs a WalkingTarget with the default speed modifier. -
Method Summary
Modifier and TypeMethodDescriptionint
Fetches the current closest enough distance.Get the Location that this WalkingTarget is looking for.double
Get the Speed Modifier of this Pathfinder.void
setDistance
(int distance) Sets the current closest enough distance.void
setSpeedModifier
(double mod) Sets the Speed Modifier of this Pathfinder.
-
Constructor Details
-
WalkingTarget
Constructs a WalkingTarget.- Parameters:
loc
- Location of targetspeedMod
- Speed Modifierdistance
- Distance needed to stop walking
-
WalkingTarget
Constructs a WalkingTarget with the default speed modifier.- Parameters:
loc
- Location of targetdistance
- Distance needed to stop walking
-
-
Method Details
-
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 interfaceSpeedModifier
- 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
Description copied from interface:SpeedModifier
Sets the Speed Modifier of this Pathfinder.- Specified by:
setSpeedModifier
in interfaceSpeedModifier
- Parameters:
mod
- Modifier to set- Throws:
IllegalArgumentException
- if greater thanFloat.MAX_VALUE
-