Removed Integer.MAX_VALUE (infinite max duration is already -1)

This commit is contained in:
bigguy345 committed 2025-04-28 10:41:36 +03:00
1 parent ae4b4c8702
commit 5dd2dad700
3 files changed
+5 -4

No files matched your search

@@ -38,11 +38,13 @@ public class Action implements IAction {
}
public Action(ScriptedActionManager manager, String name, int startAfterTicks, Consumer<IAction> task) {
this(manager, name, Integer.MAX_VALUE, startAfterTicks, task);
this(manager, name, task);
this.startAfterTicks = startAfterTicks;
}
public Action(ScriptedActionManager manager, String name, Consumer<IAction> task) {
this(manager, name, Integer.MAX_VALUE, 0, task);
this(manager, name);
this.task = task;
}
public Action(ScriptedActionManager manager, int startAfterTicks, Consumer<IAction> task) {
@@ -27,7 +27,7 @@ public class ActionChain implements IActionChain {
task.accept(act);
act.markDone();
};
IAction a = scriptedActionManager.create("chain#" + (index++), Integer.MAX_VALUE, offset, wrapper);
IAction a = scriptedActionManager.create("chain#" + (index++), offset, wrapper);
a.setUpdateEveryXTick(1);
scriptedActionManager.scheduleAction(a);
return this;
@@ -25,7 +25,6 @@ public class ParallelActionChain implements IActionChain {
act.markDone();
};
IAction a = scriptedActionManager.create("parallel#" + (idx++),
Integer.MAX_VALUE, // no max-duration
offset,
wrapper);
a.setUpdateEveryXTick(1);