Parallel IAction chain methods

This commit is contained in:
bigguy345 committed 2025-06-29 11:04:13 +03:00
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.
*