Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match Advancement Packet Behavior Towards Java #4684

Merged
merged 3 commits into from
May 22, 2024

Conversation

gecko10000
Copy link
Contributor

The client sends a "advancement tab open" packet whenever any tab is opened, not necessarily when a new one is switched to. This removes the if statement and sends the packet to the server regardless.

@gecko10000
Copy link
Contributor Author

While I'm at it, does Geyser/Bedrock have a way to detect forms closing? The Java client sends a "advancements closed" packet whenever the user closes them.

@Camotoy
Copy link
Member

Camotoy commented May 22, 2024

Look for a response handler for the given form - you can't send multiple options for a form (I.E. you input all your responses, then click "OK", or you click on the button of a simple form), so a response given means the form is closed unless the server re-sends it. Seems like that behavior might be implemented, but of course it can use another lookover. https://github.com/GeyserMC/Geyser/blob/master/core/src/main/java/org/geysermc/geyser/session/cache/AdvancementsCache.java#L138

@gecko10000
Copy link
Contributor Author

I just tested it and it does send the packet when the advancement list form is closed. However, when the form for a single advancement is closed no packet is sent. Should I add that in this PR or create a separate one?

@Camotoy
Copy link
Member

Camotoy commented May 22, 2024

Feel free to add onto this PR.

@gecko10000
Copy link
Contributor Author

Seems to work as intended from my testing now.

@onebeastchris onebeastchris merged commit 6f4c29c into GeyserMC:master May 22, 2024
2 checks passed
@gecko10000 gecko10000 deleted the advancement-behavior branch May 23, 2024 09:10
XingLingQAQ pushed a commit to XingLingQAQ/Geyser that referenced this pull request Sep 25, 2024
* Send advancement packet regardless of current tab

* Send advancement close packet when single-advancement form closed
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.

3 participants