Class PathfinderFollowMob
java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.PathfinderFollowMob
- All Implemented Interfaces:
PathfinderInfo, Ranged, SpeedModifier
Represents a Pathfinder for a Mob to follow another Mob
-
Nested Class Summary
Nested classes/interfaces inherited from class Pathfinder
Pathfinder.PathfinderFlag -
Field Summary
Fields inherited from class Pathfinder
entityFields inherited from interface Ranged
DEFAULT_ATTACK_INTERVAL, DEFAULT_ATTACK_RANGE, DEFAULT_LOOK_RANGEFields inherited from interface SpeedModifier
DEFAULT_SPEED_MODIFIER -
Constructor Summary
ConstructorsConstructorDescriptionPathfinderFollowMob(@NotNull Mob m) Constructs a PathfinderFollowMob with a stop distance of 1.PathfinderFollowMob(@NotNull Mob m, double speedMod, float stopDistance, float lookRange) Constructs a PathfinderFollowMob.PathfinderFollowMob(@NotNull Mob m, float stopDistance) Constructs a PathfinderFollowMob withRanged.DEFAULT_LOOK_RANGE.PathfinderFollowMob(@NotNull Mob m, float stopDistance, float lookRange) Constructs a PathfinderFollowMob withSpeedModifier.DEFAULT_SPEED_MODIFIER. -
Method Summary
Modifier and TypeMethodDescription@NotNull Pathfinder.PathfinderFlag[]getFlags()Fetches an Array of Flags that this Pathfinder has.Returns the pathfinder's internal name.floatgetRange()Gets the current Range.doubleGet the Speed Modifier of this Pathfinder.floatGets the Distance needed to stop following.voidsetRange(float range) Sets the current Range.voidsetSpeedModifier(double mod) Sets the Speed Modifier of this Pathfinder.voidsetStopDistance(float stop) Sets the Distance needed to stop following.Methods inherited from class Pathfinder
getEntityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PathfinderInfo
getName
-
Constructor Details
-
PathfinderFollowMob
Constructs a PathfinderFollowMob with a stop distance of 1.- Parameters:
m- Mob to use
-
PathfinderFollowMob
Constructs a PathfinderFollowMob withRanged.DEFAULT_LOOK_RANGE.- Parameters:
m- Mob to usestopDistance- Distance from the mob to stop following
-
PathfinderFollowMob
Constructs a PathfinderFollowMob withSpeedModifier.DEFAULT_SPEED_MODIFIER.- Parameters:
m- Mob to usestopDistance- Distance from the mob to stop followinglookRange- Range of looking for a mob to follow
-
PathfinderFollowMob
public PathfinderFollowMob(@NotNull @NotNull Mob m, double speedMod, float stopDistance, float lookRange) Constructs a PathfinderFollowMob.- Parameters:
m- Mob to usespeedMod- Speed Modifier to use when followingstopDistance- Distance from the mob to stop followinglookRange- Range of looking for a mob to follow
-
-
Method Details
-
getStopDistance
public float getStopDistance()Gets the Distance needed to stop following.- Returns:
- Distance to stop following.
-
setStopDistance
public void setStopDistance(float stop) Sets the Distance needed to stop following.- Parameters:
stop- distance to stop following an entity
-
getRange
-
setRange
-
getSpeedModifier
public double getSpeedModifier()Description copied from interface:SpeedModifierGet the Speed Modifier of this Pathfinder.- Specified by:
getSpeedModifierin interfaceSpeedModifier- Returns:
- Speed Modifier
-
setSpeedModifier
public void setSpeedModifier(double mod) Description copied from interface:SpeedModifierSets the Speed Modifier of this Pathfinder.- Specified by:
setSpeedModifierin interfaceSpeedModifier- Parameters:
mod- Modifier to set
-
getFlags
Description copied from class:PathfinderFetches an Array of Flags that this Pathfinder has.
- Specified by:
getFlagsin classPathfinder- Returns:
- Array of Pathfinder Flags
-
getInternalName
Description copied from interface:PathfinderInfoReturns the pathfinder's internal name. This may match the actual NMS name of the pathfinder, but it may not.- Specified by:
getInternalNamein interfacePathfinderInfo- Returns:
- Internal Name
-