Posted January 13, 20169 yr In my mod, I need to be able to tell when the player presses the "Jump" key, even if the player is not on the ground (so no workaround using onGround Boolean) and when using the "Attack/Destroy" button. I want the KeyBinding object, not some workaround, and I do not want to create my own KeyBinding object set to the same configuration. Any help is appreciated!
January 13, 20169 yr Vanilla stores its KeyBinding s in GameSettings , you can get the instance from the Minecraft#gameSettings field. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
January 15, 20169 yr Here is an example of getting an existing keybinding. https://github.com/m1k3s/parachute/blob/1.8.9-ng/parachute/client/KeyPressTick.java#L44 The ascendkey is this: https://github.com/m1k3s/parachute/blob/1.8.9-ng/parachute/client/ParachuteClientProxy.java#L38
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.