Class PathfinderRandomStrollLand
java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.PathfinderRandomStroll
me.gamercoder215.mobchip.ai.goal.PathfinderRandomStrollLand
- All Implemented Interfaces:
PathfinderInfo, Repeated, Probable, SpeedModifier
Represents a Pathfinder to randomly stroll only on land.
-
Nested Class Summary
Nested classes/interfaces inherited from class Pathfinder
Pathfinder.PathfinderFlag -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatThe default probability to stroll.Fields inherited from class Pathfinder
entityFields inherited from interface SpeedModifier
DEFAULT_SPEED_MODIFIER -
Constructor Summary
ConstructorsConstructorDescriptionPathfinderRandomStrollLand(@NotNull Creature c) Constructs a PathfinderRandomStrollLand with no speed modifier.PathfinderRandomStrollLand(@NotNull Creature c, double speedMod) Constructs a PathfinderRandomStrollLand withDEFAULT_PROBABILITY.PathfinderRandomStrollLand(@NotNull Creature c, double speedMod, float probability) Constructs a PathfinderRandomStrollLand -
Method Summary
Modifier and TypeMethodDescriptionReturns the pathfinder's internal name.floatGet the current probability of this Pathfinder.voidsetProbability(float prob) Sets the current probability of this Pathfinder.Methods inherited from class PathfinderRandomStroll
getFlags, getInterval, getSpeedModifier, setInterval, setSpeedModifierMethods 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
-
Field Details
-
DEFAULT_PROBABILITY
public static final float DEFAULT_PROBABILITYThe default probability to stroll.- See Also:
-
-
Constructor Details
-
PathfinderRandomStrollLand
Constructs a PathfinderRandomStrollLand with no speed modifier.- Parameters:
c- Creature to use
-
PathfinderRandomStrollLand
Constructs a PathfinderRandomStrollLand withDEFAULT_PROBABILITY.- Parameters:
c- Creature to usespeedMod- Speed Modifier while strolling
-
PathfinderRandomStrollLand
Constructs a PathfinderRandomStrollLand- Parameters:
c- Creature to usespeedMod- Speed Modifier while strollingprobability- probability (between 0.0 - 1.0) of initiating a stroll
-
-
Method Details
-
getProbability
public float getProbability()Description copied from interface:ProbableGet the current probability of this Pathfinder.- Specified by:
getProbabilityin interfaceProbable- Returns:
- Probability of this Pathfinder happening
-
setProbability
public void setProbability(float prob) Description copied from interface:ProbableSets the current probability of this Pathfinder.- Specified by:
setProbabilityin interfaceProbable- Parameters:
prob- Probability to set
-
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- Overrides:
getInternalNamein classPathfinderRandomStroll- Returns:
- Internal Name
-