Package net.citizensnpcs.api.ai.tree
Interface InstantBehavior
- All Superinterfaces:
Behavior
Marker interface for behaviors that execute instantly (in one tick). These behaviors complete immediately without
needing to return RUNNING.
The parser will automatically coalesce consecutive instant behaviors into a single composite that executes them all
in one tick.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidreset()Resets the behavior and any state it is holding.default booleanReturns whether the behavior is ready to run.
-
Method Details
-
reset
default void reset()Description copied from interface:BehaviorResets the behavior and any state it is holding. -
shouldExecute
default boolean shouldExecute()Description copied from interface:BehaviorReturns whether the behavior is ready to run. Note this is called once when deciding whether to start execution of a leaf node. The actual execution status is determined by the return value ofBehavior.run()which is repeatedly called by the executing node.- Specified by:
shouldExecutein interfaceBehavior
-