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.
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:
Added a jitpack.yml file which allows AnvilGUI to be compiled on the popular jitpack.io repository