Class Sequence
java.lang.Object
net.citizensnpcs.api.ai.tree.Composite
net.citizensnpcs.api.ai.tree.Sequence
- All Implemented Interfaces:
Behavior
-
Field Summary
Fields inherited from class Composite
parallelExecuting -
Method Summary
Modifier and TypeMethodDescriptionstatic SequencecreateSequence(Collection<Behavior> behaviors) Creates sequence that will stop executing if the currentBehaviorreturnsBehaviorStatus.FAILURE.static SequencecreateSequence(Behavior... behaviors) voidreset()Resets the behavior and any state it is holding.run()Runs the behavior for one 'tick', optionally changing the state that it is in.toString()Methods inherited from class Composite
addBehavior, getBehaviors, removeBehavior, shouldExecute, stopExecution, tickParallel
-
Method Details
-
reset
-
run
Description copied from interface:BehaviorRuns the behavior for one 'tick', optionally changing the state that it is in.- Returns:
- The new state
-
toString
-
createSequence
-
createSequence
Creates sequence that will stop executing if the currentBehaviorreturnsBehaviorStatus.FAILURE.
-