a buncha IAction adjustments

This commit is contained in:
bigguy345 committed 2025-07-05 10:19:10 +03:00
1 parent e5c347e0a4
commit 14f7bd3dd4
4 files changed
+34 -1

No files matched your search

@@ -131,6 +131,8 @@ public interface IActionManager {
IActionQueue getQueue(String name);
boolean hasQueue(String name);
/**
* @param name
* @return True if queue successfully removed from IActionManager and cleared
@@ -134,6 +134,7 @@ public interface IAction {
*/
int getUpdateEvery();
/**
* Set how many ticks between each execution of the action task.
*
@@ -141,6 +142,18 @@ public interface IAction {
*/
IAction updateEvery(int ticks);
/**
* Executes task every tick (Sets updateEvery to 1)
* @return
*/
IAction everyTick();
/**
* Executes task every second (Sets updateEvery to 20)
* @return
*/
IAction everySecond();
/**
* @return how many ticks remain before the action begins (initial delay)
*/
@@ -6,10 +6,25 @@ public interface IActionChain {
String getName();
/**
* @param name of chain
* @return
*/
IActionChain setName(String name);
/**
*
* @return queue this chain is scheduled on
*/
IActionQueue getQueue();
/**
*
* @param delay ticks between an IAction and another
* @param name name of IAction
* @param task task of IAction
* @return
*/
IActionChain after(int delay, String name, Consumer<IAction> task);
IActionChain after(int delay, Consumer<IAction> task);
@@ -62,7 +62,10 @@ public interface IActionQueue {
*/
IActionQueue killWhenEmptyAfter(int ticks);
boolean isKilled();
/**
* @return True if queue was removed from IActionManager or killed
*/
boolean isDead();
/**
* @return kills queue and removes it from IActionManager immediately