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 am trying to cancel the dismount event, but its being weird. If I simply do the following in my event handler:

@SubscribeEvent
public void onMountEvent(EntityMountEvent e) {
        if (e.isDismounting()) {
            e.setCanceled(true);
        }
}

it will cancel successfully server side but my client does a weird thing where it sort of twitches back and forth and only lets me look up/down while not being able to move. If I try running the event with !world.isremote, it will only cancel server side and my client still dismounts (remounts when leaving/rejoining). How can I make this event cancel properly? 

  • Author
29 minutes ago, diesieben07 said:

You probably have to cancel it on client and server.

My event handler is set up normally, so it runs on both client and server. When the event is cancelled it does indeed prevent me from dismounting, but then puts my player in a state where I can't move except to look up and down, so something is not working.

 

Also in past Minecraft versions it only worked if I just cancelled the event server side, but that no longer works either, so I'm sort of at a loss. 

Dismounting an entity on client causes an infinite loop. Further testing reveals that only the player is affected when dismounting and can still control the riding entity. Server information syncs to client on game reload. ClientPlayerEntity movement input is no longer being sampled nor is livingTick even called. ClientPlayerEntity overrides isSneaking making setSneaking for setting the flag pointless on the client.

 

This is most likely a bug.

Edited by ChampionAsh5357

  • Author
7 minutes ago, ChampionAsh5357 said:

Dismounting an entity on client causes an infinite loop. Further testing reveals that only the player is affected when dismounting and can still control the riding entity. Server information syncs to client on game reload. ClientPlayerEntity movement input is no longer being sampled nor is livingTick even called. ClientPlayerEntity overrides isSneaking making setSneaking for setting the flag pointless on the client.

 

This is most likely a bug.

Thank you for testing this! So I guess this event is just sort of broken in the sense of not being cancellable right now :/

5 minutes ago, Electric said:

Thank you for testing this! So I guess this event is just sort of broken in the sense of not being cancellable right now :/

Sort of. The mounting can still be disabled. Only dismounting is bugged. The issue is that the client does not tick the PlayerEntity unless it is not riding an entity causing the movement flag to always be set to true.

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.