Skip to content

Fix #resume unpausing the builder when reporting Not paused - #5108

Open
cryst6lkush wants to merge 1 commit into
cabaletta:1.19.4from
cryst6lkush:fix/issue-5101-resume-not-paused
Open

cryst6lkush wants to merge 1 commit into
cabaletta:1.19.4from
cryst6lkush:fix/issue-5101-resume-not-paused

Conversation

@cryst6lkush

Copy link
Copy Markdown

Changes

Fixes #5101

The resume command in ExecutionControlCommands had two interacting bugs:

  1. builderProcess.resume() was called before the Not paused check, so the error path still unpaused the builder as a side effect.
  2. The check only inspected the user-pause flag (paused[0]), ignoring BuilderProcess's own sticky pause (isPaused()), which is set when the builder gives up on a placement (Unable to do it. Pausing. resume to resume) or is paused externally — which is what happens when Litematica's Baritone integration stops a build (reported there as an "Out Of Blocks" stop).

So when the builder was self-paused, #resume resumed the task (the "task continues anyway" part of the issue) while still printing Not paused. And when genuinely nothing was paused, it unpaused the builder silently.

Behavior after this change

  • #resume prints Not paused only when neither the user pause nor the builder self-pause is set, and no longer has side effects in that case.
  • #resume now correctly resumes a builder that paused itself (or was paused externally) and prints Resumed.

This matches the behavior the issue requested: either Resumed or a suppressed Not paused, with the task continuing.

Testing

  • ./gradlew compileJava passes (JDK 17).
  • Manual reasoning over the three states: user-paused, builder self-paused, nothing paused. The build has no automated tests covering the command layer; verification steps from the issue (Litematica build hitting "Unable to do it. Pausing.", then #resume) now print Resumed and continue without the contradictory message.

The resume command called BuilderProcess.resume() before checking the
user-pause flag, and the check ignored the builder's own sticky pause
(set by "Unable to do it. Pausing." or by external processes such as
Litematica's integration). Running #resume therefore unpaused the
builder while telling the user it was not paused, instead of either
resuming silently or reporting the error without side effects.

Now the command checks both pause states first and only unpauses when
one of them is actually set, so the error case no longer has side
effects and a builder self-pause is resumed properly.

Fixes cabaletta#5101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Litematica] Running #resume after an "Out Of Blocks" message prints "Not paused", but the task resumes.

1 participant