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

Fix crash when a keybinding with a category not known to MC gets added #11

Open
wants to merge 3 commits into
base: jitpack
Choose a base branch
from

Conversation

gbl
Copy link

@gbl gbl commented Dec 25, 2018

When a KeyBinding gets added that uses a category that's unknown to Minecraft, opening the "Controls" option dialog results in a crash.

This is because KeyBinding.java initializes a map (called CATEGORY_ORDER) from category name to a sorting index, and this map doesn't get updated when the KeyBind is added, resulting in an NPE when the GUI actually tries sorting existing indexes.

This patch fixes this behaviour by providing a Mixin that appends the new category name to the CATEGORY_ORDER map whenever a KeyBind with an yet-unknown name gets added.

…client and never see the server, and merge local and server completion suggestions for the client gui.
@gbl
Copy link
Author

gbl commented Dec 27, 2018

This is the pull request for the LocalCommandAdder interface + supporting Mixins to allow commands be executed on the client thread without ever being sent to the server, and combining client + server commands in the command line GUI suggestions.

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