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

/**
* LivingJumpEvent is fired when an Entity jumps.<br>
* This event is fired whenever an Entity jumps in 
* EntityLivingBase#jump(), EntityMagmaCube#jump(),
* and EntityHorse#jump().<br>
* <br>
* This event is fired via the {@link ForgeHooks#onLivingJump(EntityLivingBase)}.<br>
* <br>
* This event is not {@link Cancelable}.<br>
* <br>
* This event does not have a result. {@link HasResult}<br>
* <br>
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
**/
public static class LivingJumpEvent extends LivingEvent
{
ย  ย  public LivingJumpEvent(EntityLivingBase e){ super(e); }
}

ย 

I think coolAlias's solution is quite good. My first thought was to cancel the event, however it would seem that this particular even cannot be cancelled.

I still haven't published a mod because I can never get that in-dev version just right to warrant a public release. And yes, after two years of mod development I am still learning to speak Java.

ย 

Follow me on GitHub: https://github.com/yooksi

Contact me on Twitter: https://twitter.com/yooksi

Read my Minecraft blog: https://yooksidoesminecraft.blogspot.de/

Just to note that other mods may also be listening for the jump event and applying their own modifiers (e.g. jump boost), and their listeners may or may not come before yours. If they come after, you might find that the player is still able to jump, albeit probably not as high as they would have without your event handler.

ย 

You can set a Priority level for your event handler; HIGHer priorities are handled first, and LOWer priorities handled last.

@SubscribeEvent(priority=EventPriority.LOWEST)
public void onJump(LivingJumpEvent event) {
ย  // this handler will now happen after all other non-LOWEST priority handlers
}

Generally, you want to leave your priority level alone, but if you disabling player jumping is integral to your mod, you can consider using LOW or LOWEST priority so that your handler has the last say.

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.