Class PathfinderFleeSun
java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.PathfinderFleeSun
- All Implemented Interfaces:
PathfinderInfo, SpeedModifier
Represents a Pathfinder for a Creature to avoid the sun or to extinguish a fire.
This is an advanced version of PathfinderRestrictSun. The other pathfinder will only have the Creature avoid the sun, with not speed modifier included.
-
Nested Class Summary
Nested classes/interfaces inherited from class Pathfinder
Pathfinder.PathfinderFlag -
Field Summary
Fields inherited from class Pathfinder
entityFields inherited from interface SpeedModifier
DEFAULT_SPEED_MODIFIER -
Constructor Summary
ConstructorsConstructorDescriptionPathfinderFleeSun(@NotNull Creature m) Creates a PathfinderFleeSun with a default speed modifier.PathfinderFleeSun(@NotNull Creature m, double speedMod) Creates a PathfinderFleeSun. -
Method Summary
Modifier and TypeMethodDescription@NotNull Pathfinder.PathfinderFlag[]getFlags()Fetches an Array of Flags that this Pathfinder has.Returns the pathfinder's internal name.doubleGet the Speed Modifier of this Pathfinder.voidsetSpeedModifier(double mod) Sets the Speed Modifier of this Pathfinder.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
-
PathfinderFleeSun
Creates a PathfinderFleeSun with a default speed modifier.- Parameters:
m- Creature to use
-
PathfinderFleeSun
Creates a PathfinderFleeSun.- Parameters:
m- Creature to usespeedMod- Speed Modifier of fleeing
-
-
Method Details
-
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
-