Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by Xing

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".

At the very bottom of the KeyBinding class there's this function:

image.png.593cb3196eb601e9891430aabf537e58.png

Hopefully it's obvious what that function does.

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.