Package net.citizensnpcs.api.ai.tree
Class Sequence
java.lang.Object
net.citizensnpcs.api.ai.tree.BehaviorGoalAdapter
net.citizensnpcs.api.ai.tree.Composite
net.citizensnpcs.api.ai.tree.Sequence
Runs each 
Behavior in sequence.- 
Method SummaryModifier and TypeMethodDescriptionstatic SequencecreateRetryingSequence(Collection<Behavior> behaviors) Creates aretryingsequence that will continue from the currentBehaviorif it returnsBehaviorStatus.FAILUREinstead of propagating the failure up to its parent.static SequencecreateRetryingSequence(Behavior... behaviors) static SequencecreateSequence(Collection<Behavior> behaviors) Creates sequence that will stop executing if the currentBehaviorreturnsBehaviorStatus.FAILURE.static SequencecreateSequence(Behavior... behaviors) voidreset()Resets the goal and any resources or state it is holding.booleanrun()Runs the behavior for one 'tick', optionally changing the state that it is in.toString()Methods inherited from class net.citizensnpcs.api.ai.tree.CompositeaddBehavior, getBehaviors, removeBehavior, shouldExecute, stopExecution, tickParallelMethods inherited from class net.citizensnpcs.api.ai.tree.BehaviorGoalAdaptercreate, run, shouldExecute
- 
Method Details- 
resetpublic void reset()Description copied from interface:GoalResets the goal and any resources or state it is holding.
- 
retryChildrenpublic boolean retryChildren()
- 
runDescription copied from interface:BehaviorRuns the behavior for one 'tick', optionally changing the state that it is in.- Returns:
- The new state
 
- 
toString
- 
createRetryingSequence
- 
createRetryingSequenceCreates aretryingsequence that will continue from the currentBehaviorif it returnsBehaviorStatus.FAILUREinstead of propagating the failure up to its parent.
- 
createSequence
- 
createSequenceCreates sequence that will stop executing if the currentBehaviorreturnsBehaviorStatus.FAILURE.
 
-