Posted May 18, 20205 yr I'm very new to modding(3 days), so i might ask some dopey questions. My code looks like this: if (entityName.equals(playerName)) { KeyBinding.onTick(minecraft.gameSettings.keyBindJump.getKey()); KeyBinding.onTick(minecraft.gameSettings.keyBindDrop.getKey()); } When the player got hurt, the player jump and drop the item in hand. The drop works properly, but the jump doesn't want to activate. if I do the to string: System.out.println(minecraft.gameSettings.keyBindDrop.toString()); System.out.println(minecraft.gameSettings.keyBindJump.getKey().toString()); the console seems right to me net.minecraft.client.settings.KeyBinding@4a4ef86a key.keyboard.space Minecraft version 1.15.2 Forge version: forge-1.15.2-31.2.0-mdk Edited May 18, 20205 yr by Xing
May 18, 20205 yr Why don't you just add some Y velocity to the player? It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
May 18, 20205 yr At the very bottom of the KeyBinding class there's this function: Hopefully it's obvious what that function does.
May 18, 20205 yr You can take a look at my github, I implement almost every button possible there. But some will only work in single player. https://github.com/Zen3515/Minecraft-Http-Controller/blob/master/src/main/java/com/zen3515/mcrestful/ClientSocket.java#L148
May 18, 20205 yr Author 48 minutes ago, Zen3515 said: You can take a look at my github, I implement almost every button possible there. But some will only work in single player. https://github.com/Zen3515/Minecraft-Http-Controller/blob/master/src/main/java/com/zen3515/mcrestful/ClientSocket.java#L148 Thank you so much! setKeyBindState worked!
May 18, 20205 yr Author 5 hours ago, Novârch said: Why don't you just add some Y velocity to the player? Because the jumping height needs to be different some times
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.