Package dev.twilite.client.plugins
Class BehaviorResult
java.lang.Object
dev.twilite.client.plugins.BehaviorResult
Result returned by behavior tree nodes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic BehaviorResultfailure()Marks the node as not applicable or failed.static BehaviorResultrunning()Keeps the current branch running and ticks it again on the next server tick.status()Returns this node's behavior-tree status.static BehaviorResultDisables the owning plugin after the current behavior tick.static BehaviorResultsuccess()Marks the node as complete.static BehaviorResultwait(int ticks) Keeps the current branch running and waits the given number of server ticks.static BehaviorResultwaitUntil(BooleanSupplier condition, int timeout) Keeps the current branch running until the supplied condition is true or the timeout elapses.static BehaviorResultwaitUntil(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.
-
Method Details
-
success
Marks the node as complete. -
failure
Marks the node as not applicable or failed. -
running
Keeps the current branch running and ticks it again on the next server tick. -
wait
Keeps the current branch running and waits the given number of server ticks. -
waitUntil
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
Disables the owning plugin after the current behavior tick. -
status
Returns this node's behavior-tree status.
-