Skip to content

Fix books not dimming the world behind them - #229

Open
digi2303 wants to merge 2 commits into
AlexModGuy:1.21from
digi2303:polish-1.21.1
Open

Fix books not dimming the world behind them#229
digi2303 wants to merge 2 commits into
AlexModGuy:1.21from
digi2303:polish-1.21.1

Conversation

@digi2303

@digi2303 digi2303 commented Aug 5, 2026

Copy link
Copy Markdown

Opening a book on 1.21 doesn't dim the world behind it the way it does on 1.20.

GuiBasicBook has an empty renderMenuBackground override. It was added in c9fe2ea and hasn't shipped in a release, so it only affects this branch.

Deleting it isn't quite enough though. On 1.21 Screen.render calls renderBackground itself, which it didn't do on 1.20, so the background got drawn a second time over the finished book. And the old 1.20 gradient is still there as renderTransparentBackground, nothing just calls it anymore.

So this makes renderBackground a no-op and draws the background once in render(), before the book. The flush() is needed because fillGradient is batched while BookBlit draws immediately, same as drawEntityOnScreen already does.

renderBlurredBackground is unreachable now. The blur stays off anyway, happy to remove it if you'd rather.

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.

1 participant