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.

mounted movement not ... ?permanent? (in lack of a better description...)

Featured Replies

Posted

Now I have managed to get my entities running.

They spawn with the intended initial data, can be interacted with etc ....

 

and can be mounted. But ...

 

I can move the mounted player/entity a few blocks, then the mount and player are moving back to the original location (where the player has mounted the entity)...

 

I have searched in the vanilla boat and pig code, but could not find anything that would indicate to address this issue ...

 

does anybody know to fix this? Or where I could try to look for a solution?

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

It seems that you only update the position / movement in the client thread. The server entity doesn't move at all then and because Minecraft updates positions a bit lazily, you can move a few blocks and then you'll be teleported back to the server's position.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

  • Author

so I came to the conclusion I have to do it completely myself with a PacketHandler. But is there a convenient time/place to trigger the send? Just in the routine doing the move itself would be imho a bit much for the sake of packet traffic. An elegant solution would be a request from the server to the client to send the current position right before updating the client position. But doesn't the server send it's packets via the PacketHandler only every now and then via a queue and not intermediately after giving the send order? Thus would such a construct be always late...

 

Thus, is there a direct channel from server to client for such functionalities?

 

and additionally, why can't I find anything regarding such issues in the vanilla boat or pig code? Or am I just to daft to recognise it?

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

That is because the vanilla boat/pig and such do it on the server side, not the client side.  Player position set on the server side is automatically translated to the client.

 

For interpolation reasons you might want to set it on both though.

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.