Class BehaviorResult

java.lang.Object
dev.twilite.client.plugins.BehaviorResult

public final class BehaviorResult extends Object
Result returned by behavior tree nodes.
  • Method Details

    • success

      public static BehaviorResult success()
      Marks the node as complete.
    • failure

      public static BehaviorResult failure()
      Marks the node as not applicable or failed.
    • running

      public static BehaviorResult running()
      Keeps the current branch running and ticks it again on the next server tick.
    • wait

      public static BehaviorResult wait(int ticks)
      Keeps the current branch running and waits the given number of server ticks.
    • waitUntil

      public static BehaviorResult waitUntil(BooleanSupplier condition, int timeout)
      Keeps the current branch running until the supplied condition is true or the timeout elapses.
    • waitUntil

      public static BehaviorResult waitUntil(BooleanSupplier condition, BooleanSupplier reset, int timeout)
      Keeps the current branch running until the supplied condition is true or the timeout elapses, resetting the timeout whenever the reset condition is true.
    • stopPlugin

      public static BehaviorResult stopPlugin()
      Disables the owning plugin after the current behavior tick.
    • status

      public BehaviorStatus status()
      Returns this node's behavior-tree status.