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

Send experience packets to support Bedrock via Geyser #337

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

PikaMug
Copy link
Contributor

@PikaMug PikaMug commented Jun 27, 2024

Fixes #332

Bedrock does not allow the result slot to be clicked when the player's experience level is 0. This change sends a packet which sets the Bedrock client's level to 20 (number is trivial) on anvil open, and then again back to the actual value when closed. It adds a .gesyer-compat(boolean) to the builder, which is enabled by default. A second constructor has been added to AnvilGUI for backwards compatibility.

In writing this, it occurs to me it may be preferred to have the method be something like .disableGeyserCompat() instead, to match .preventClose(). Let me know if that's what you'd prefer.

Other changes I made in order to test this:

Send experience packets to support Bedrock via Geyser
api/src/main/java/net/wesjd/anvilgui/AnvilGUI.java Outdated Show resolved Hide resolved
jitpack.yml Outdated Show resolved Hide resolved
@WesJD
Copy link
Owner

WesJD commented Jul 3, 2024

final thing to do then is just increment the minor version and we're good to merge (1.10.0-SNAPSHOT)

@WesJD
Copy link
Owner

WesJD commented Jul 4, 2024

Thank you for your help!

@WesJD WesJD merged commit a7cac4b into WesJD:master Jul 4, 2024
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.

AnvilGUI doesn't work for bedrock players
2 participants