Package me.gamercoder215.mobchip.ai.goal
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 me.gamercoder215.mobchip.ai.goal.Pathfinder
Pathfinder.PathfinderFlag
-
Field Summary
Fields inherited from class me.gamercoder215.mobchip.ai.goal.Pathfinder
entity
Fields inherited from interface me.gamercoder215.mobchip.ai.goal.Ranged
DEFAULT_ATTACK_INTERVAL, DEFAULT_ATTACK_RANGE, DEFAULT_LOOK_RANGE
Fields inherited from interface me.gamercoder215.mobchip.ai.SpeedModifier
DEFAULT_SPEED_MODIFIER
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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 TypeMethodDescriptiongetFlags()
Fetches an Array of Flags that this Pathfinder has.Returns the NMS Internal Name.float
getRange()
Gets the current Range.double
Get the Speed Modifier of this Pathfinder.float
Gets the Distance needed to stop following.void
setRange
(float range) Sets the current Range.void
setSpeedModifier
(double mod) Sets the Speed Modifier of this Pathfinder.void
setStopDistance
(float stop) Sets the Distance needed to stop following.Methods inherited from class me.gamercoder215.mobchip.ai.goal.Pathfinder
getEntity
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.gamercoder215.mobchip.ai.goal.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
public float getRange()Description copied from interface:Ranged
Gets the current Range. -
setRange
public void setRange(float range) Description copied from interface:Ranged
Sets the current Range. -
getSpeedModifier
public double getSpeedModifier()Description copied from interface:SpeedModifier
Get the Speed Modifier of this Pathfinder.- Specified by:
getSpeedModifier
in interfaceSpeedModifier
- Returns:
- Speed Modifier
-
setSpeedModifier
public void setSpeedModifier(double mod) Description copied from interface:SpeedModifier
Sets the Speed Modifier of this Pathfinder.- Specified by:
setSpeedModifier
in interfaceSpeedModifier
- Parameters:
mod
- Modifier to set
-
getFlags
Description copied from class:Pathfinder
Fetches an Array of Flags that this Pathfinder has.
- Specified by:
getFlags
in classPathfinder
- Returns:
- Array of Pathfinder Flags
-
getInternalName
Description copied from interface:PathfinderInfo
Returns the NMS Internal Name.- Specified by:
getInternalName
in interfacePathfinderInfo
- Returns:
- Internal Name
-