Fix #resume unpausing the builder when reporting Not paused - #5108
Open
cryst6lkush wants to merge 1 commit into
Open
cryst6lkush wants to merge 1 commit into
cryst6lkush wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Fixes #5101
The
resumecommand inExecutionControlCommandshad two interacting bugs:builderProcess.resume()was called before theNot pausedcheck, so the error path still unpaused the builder as a side effect.paused[0]), ignoringBuilderProcess'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,
#resumeresumed the task (the "task continues anyway" part of the issue) while still printingNot paused. And when genuinely nothing was paused, it unpaused the builder silently.Behavior after this change
#resumeprintsNot pausedonly when neither the user pause nor the builder self-pause is set, and no longer has side effects in that case.#resumenow correctly resumes a builder that paused itself (or was paused externally) and printsResumed.This matches the behavior the issue requested: either
Resumedor a suppressedNot paused, with the task continuing.Testing
./gradlew compileJavapasses (JDK 17).#resume) now printResumedand continue without the contradictory message.