import dev.modzuozhi.core.compat.PauseOwnership; public final class PauseOwnershipRegression { public static void main(String[] args) { for (int mask = 0; mask < 16; mask++) { boolean paused = PauseOwnership.shouldPause((mask & 1) != 0, (mask & 2) != 0, (mask & 4) != 0, (mask & 8) != 0); if (paused != (mask == 15)) throw new AssertionError("Loading screen paused worker: " + mask); } if (PauseOwnership.workerOwns(false, false, false)) throw new AssertionError("Startup routed to absent worker"); if (!PauseOwnership.workerOwns(true, false, false)) throw new AssertionError("Running loop lost ownership"); if (!PauseOwnership.workerOwns(true, true, true)) throw new AssertionError("In-flight tick lost ownership"); if (PauseOwnership.workerOwns(true, true, false)) throw new AssertionError("Idle paused worker kept requests"); System.out.println("PASS: loading/login pause gate and drained-pause chunk ownership"); } }