diff --git a/java/noppes/npcs/api/handler/data/IAction.java b/java/noppes/npcs/api/handler/data/IAction.java index 5d645b1..3a2f214 100644 --- a/java/noppes/npcs/api/handler/data/IAction.java +++ b/java/noppes/npcs/api/handler/data/IAction.java @@ -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 task); + + IAction parallel(int delay, Consumer task); + + IAction parallel(String name, Consumer task); + + IAction parallel(String name, int startAfterTicks, Consumer task); + /** * Enqueue another action immediately after this one. *