Posted October 2, 20186 yr how i get a existing keybind but one keybind vanilla that is, I did not create but she exists.
October 2, 20186 yr 37 minutes ago, Ragnar said: how i get a existing keybind but one keybind vanilla that is, I did not create but she exists. There is a field in the Minecraft class called keyBindings. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
October 2, 20186 yr Author I have to use the getKeybinds () method to get? If yes, then come what?I have to use the getKeybinds () method to get? If yes, then come what?
October 2, 20186 yr 14 minutes ago, Ragnar said: I have to use the getKeybinds () method to get? If yes, then come what?I have to use the getKeybinds () method to get? If yes, then come what? Look through the code you can get any keybind you want from there. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
October 2, 20186 yr Author Can you be clearer? I do not speak English very well because I'm from another country, so it's complicated to read the codes
October 2, 20186 yr The GameSettings class has public fields for all the vanilla key bindings. For example there is field keyBindLeft, keyBindRight, etc. To check for these you should handle the KeyInputEvent and since it is client-side only you can use the Minecraft class to get the GameSettings instance then get the keybind then call method to check if it is pressed. For example: if (Minecraft.getMinecraft().gameSettings.keyBindLeft.isPressed()) { */ Do something here /* } Check out my tutorials here: http://jabelarminecraft.blogspot.com/
October 2, 20186 yr Author Thanks a lot, one more thing is it possible for me to get the KeyInputEvent event player? if yes how can I get it, because the method I want to use in KeyInputEvent uses EntityPlayer
October 2, 20186 yr 22 minutes ago, Ragnar said: Thanks a lot, one more thing is it possible for me to get the KeyInputEvent event player? if yes how can I get it, because the method I want to use in KeyInputEvent uses EntityPlayer I know you solved it, but just in case other people come to this thread: Whenever you're handling an event that is client-side only you are free to use the Minecraft.getMinecraft() method to get the instance of the Minecraft class. From there you can access all sorts of client-related things such as the player, keybinds, mouse movement, rendering stuff and so forth. So you'll notice client side events often don't pass much information in the parameter because they know you can access it directly through Minecraft class. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.