More constructors and setters

This commit is contained in:
bigguy345 committed 2025-04-28 10:09:50 +03:00
1 parent 06d73d7f11
commit d053084ee0
2 files changed
+19 -1

No files matched your search

+17 -1
View File
@@ -10,7 +10,13 @@ import java.util.function.Consumer;
public interface IAction {
/**
* @return how many times this action’s {@code action.accept(this)} callback has run
* @param task code to execute each time the action fires
* @return
*/
IAction setTask(Consumer<IAction> task);
/**
* @return how many times this action’s {@code action.accept(this)} callback has run (or how many times task ran)
*/
int getCount();
@@ -29,6 +35,8 @@ public interface IAction {
*/
int getMaxDuration();
IAction setMaxDuration(int x);
/**
* Mark this action as complete. Once done, it will be removed on the next tick.
*/
@@ -55,6 +63,8 @@ public interface IAction {
*/
IAction addData(String key, Object value);
IAction removeData(String key);
/**
* @return how many ticks between each invocation of the action callback
*/
@@ -72,6 +82,12 @@ public interface IAction {
*/
int getStartAfterTicks();
/**
* @param ticks pauses action for this number of ticks (any subsequent action is paused too)
* @return
*/
IAction pauseFor(int ticks);
/**
* @return the next action in the queue (or null if none or at end)
*/