Package net.citizensnpcs.api.ai.tree
Class Selector
java.lang.Object
net.citizensnpcs.api.ai.tree.BehaviorGoalAdapter
net.citizensnpcs.api.ai.tree.Composite
net.citizensnpcs.api.ai.tree.Selector
A selector of sub-goals, that chooses a single 
Behavior to execute from a list. The default selection
 function is a random selection but this can be specified in the builder.- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionvoidreset()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.static Selector.Builderselecting(Collection<Behavior> behaviors) static Selector.BuildertoString()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- 
getNextBehavior
- 
getSelectionFunction
- 
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
- 
selecting
- 
selecting
 
-