Refactor: extract MacroClientThread from MacroExecutor (upstream #4)

Move 8 client-thread/tick dispatch methods plus the TICK_ALIGNED
queue verbatim into MacroClientThread. drainTickAligned kept as public
delegate for the mixin caller; run/call variants re-pointed across all
helpers. All bodies verified identical against HEAD modulo mechanical
MacroExecutor./MacroClientThread. qualification.
This commit is contained in:
sectersion 2026-10-11 16:24:21 +01:00
parent 79c1e81cc6
commit 61938e7774
8 changed files with 273 additions and 255 deletions

View file

@ -16,7 +16,7 @@ final class MacroDurability {
AtomicReference<DurabilityUseNextSession> sessionRef = new AtomicReference<>();
long start = System.currentTimeMillis();
while (MacroExecutor.isCurrentRunActive()) {
if (Boolean.TRUE.equals(MacroExecutor.callOnClientThread(mc, () -> tickDurabilityUseNext(mc, action, sessionRef), Boolean.FALSE))) {
if (Boolean.TRUE.equals(MacroClientThread.callOnClientThread(mc, () -> tickDurabilityUseNext(mc, action, sessionRef), Boolean.FALSE))) {
return;
}
if (action.timeoutMs > 0 && System.currentTimeMillis() - start >= action.timeoutMs) return;