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 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 TypeMethodDescriptionintFetches the current closest enough distance.@NotNull LocationGet the Location that this WalkingTarget is looking for.doubleGet the Speed Modifier of this Pathfinder.voidsetDistance(int distance) Sets the current closest enough distance.voidsetSpeedModifier(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:SpeedModifierGet the Speed Modifier of this Pathfinder.- Specified by:
getSpeedModifierin 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:SpeedModifierSets the Speed Modifier of this Pathfinder.- Specified by:
setSpeedModifierin interfaceSpeedModifier- Parameters:
mod- Modifier to set- Throws:
IllegalArgumentException- if greater thanFloat.MAX_VALUE
-