mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-15 16:04:44 +00:00
Parallel IAction chain methods
This commit is contained in:
1 parent
131abe70b4
commit
65c81997b9
1 file changed
+18
@@ -41,6 +41,9 @@ public interface IAction {
|
||||
|
||||
/**
|
||||
* @return the maximum number of ticks this action is allowed to run before auto-terminating
|
||||
*
|
||||
* P.S: If the max duration is reached and this IAction is threaded using {@link #threadify()} and the thread is paused using any of the pausing methods,
|
||||
* the thread is forcibly resumed and finishes the task execution once.
|
||||
*/
|
||||
int getMaxDuration();
|
||||
|
||||
@@ -149,6 +152,21 @@ public interface IAction {
|
||||
*/
|
||||
IAction getPrevious();
|
||||
|
||||
/**
|
||||
* Enqueue another IAction on the parallel chain which starts firing simultaneously as this.
|
||||
*
|
||||
* @param after the action to run next
|
||||
*/
|
||||
IAction parallel(IAction after);
|
||||
|
||||
IAction parallel(Consumer<IAction> task);
|
||||
|
||||
IAction parallel(int delay, Consumer<IAction> task);
|
||||
|
||||
IAction parallel(String name, Consumer<IAction> task);
|
||||
|
||||
IAction parallel(String name, int startAfterTicks, Consumer<IAction> task);
|
||||
|
||||
/**
|
||||
* Enqueue another action immediately after this one.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user