Closed v-rob closed 4 years ago
Thanks for your PR. This idea sounds good on the paper, but might not always work as intended. Imagine the cart continues driving after the player left - some mapblocks later it gets unloaded and also saves its driver. Now it the player re-joins, then the cart is not always loaded at the same time. However, when it does get loaded then the player gets teleported over the entire world (if they happen to be already this far away) to attach to the cart again.
Hmm. I thought about that, but didn't really consider it very much. Perhaps it could be a setting, since I want to reconnect to my carts in singleplayer. If that sounds fine, then I'll get to coding that (and an improvement to my code that I forgot to add earlier)
This pull request makes it so that players reattach to the cart they were on after reentering the game. If a player leaves the game, other players can then get onto that cart, and if the original player in the cart reconnects, he will not reattach to that cart since there is already a player in it.