Package me.gamercoder215.mobchip.ai.goal
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 me.gamercoder215.mobchip.ai.goal.Pathfinder
Pathfinder.PathfinderFlag
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float
The default probability to stroll.Fields inherited from class me.gamercoder215.mobchip.ai.goal.Pathfinder
entity
Fields inherited from interface me.gamercoder215.mobchip.ai.SpeedModifier
DEFAULT_SPEED_MODIFIER
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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 NMS Internal Name.float
Get the current probability of this Pathfinder.void
setProbability
(float prob) Sets the current probability of this Pathfinder.Methods inherited from class me.gamercoder215.mobchip.ai.goal.PathfinderRandomStroll
getFlags, getInterval, getSpeedModifier, setInterval, setSpeedModifier
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
-
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:Probable
Get the current probability of this Pathfinder.- Specified by:
getProbability
in interfaceProbable
- Returns:
- Probability of this Pathfinder happening
-
setProbability
public void setProbability(float prob) Description copied from interface:Probable
Sets the current probability of this Pathfinder.- Specified by:
setProbability
in interfaceProbable
- Parameters:
prob
- Probability to set
-
getInternalName
Description copied from interface:PathfinderInfo
Returns the NMS Internal Name.- Specified by:
getInternalName
in interfacePathfinderInfo
- Overrides:
getInternalName
in classPathfinderRandomStroll
- Returns:
- Internal Name
-