Interface InstantBehavior

All Superinterfaces:
Behavior

public interface InstantBehavior extends 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 Type
    Method
    Description
    default void
    Resets the behavior and any state it is holding.
    default boolean
    Returns whether the behavior is ready to run.

    Methods inherited from interface net.citizensnpcs.api.ai.tree.Behavior

    run
  • Method Details

    • reset

      default void reset()
      Description copied from interface: Behavior
      Resets the behavior and any state it is holding.
      Specified by:
      reset in interface Behavior
    • shouldExecute

      default boolean shouldExecute()
      Description copied from interface: Behavior
      Returns 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 of Behavior.run() which is repeatedly called by the executing node.
      Specified by:
      shouldExecute in interface Behavior