Skip to content

Load books on first open - #846

Open
Mqrius wants to merge 1 commit into
VazkiiMods:1.20.1from
Mqrius:1.20.1
Open

Load books on first open#846
Mqrius wants to merge 1 commit into
VazkiiMods:1.20.1from
Mqrius:1.20.1

Conversation

@Mqrius

@Mqrius Mqrius commented Mar 14, 2026

Copy link
Copy Markdown

What

Fixes #845

Bug Details

Initial book loading is gated by ClientAdvancements::onClientPacket to prevent "excessive toast spam", as explained by the comment on that method.

However, when no advancements are registered or no advancements are achieved yet by the player, this never loads the books.

Fix Details

If the books are unloaded at the moment of the player opening the book, then reload the books first.

We do still want to load the books when the first advancements package arrives, because we need to check if we need to toast, so both paths still exist and use a shared source of truth.

@Minecraftschurli

Copy link
Copy Markdown
Collaborator

This PR just moves a boolean flag to another class and adds a single reload point? I'll have a look if this needs to be this difficult.

@Minecraftschurli Minecraftschurli self-assigned this May 26, 2026
@Mqrius

Mqrius commented May 26, 2026

Copy link
Copy Markdown
Author

Yeah, though be careful not to try loading them too early in the boot process before things have been sent from the server. I had that issue for a bit until I moved it to load on first book open instead.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants