WorldBorder

WorldBorder

1M Downloads

Player is dismounted when world wrap is enabled

ams2990 opened this issue ยท 2 comments

commented

A played crossed the worldborder in a boat. They were dismounted from their boat and teleported to the other side of the world. Their boat continued on its original path and is now sitting outside the worldborder. The boat should come with the player, even if they are momentarily dismounted.

commented

Due to a longstanding issue/bug with teleportation in Bukkit, players have to be ejected from vehicles before being teleported, and the vehicle has to also be teleported. Further, teleportation of boats specifically is bugged, so those are actually removed and recreated by WorldBorder at the new target location instead of being teleported like other vehicles. Then, assuming remount delay config option is not set to 0, the player is mounted back on their vehicle a few ticks later (the delay is needed to prevent nasty server/client desync in regards to player being mounted).
There's also the issue of the player possibly having their own passenger, as some plugins allow, such as small pets riding the player. In that case, the player's passenger is dismounted and left dismounted, and also teleported along with them to the new location.

I've checked through the code and don't see anything wrong with the code that a boat or any other vehicle wouldn't come along with the player when they're teleported to an opposite border. The only possibility I can think of is that since the vehicle is teleported before the player, maybe the remote chunk isn't loaded properly until a player shows up there, causing the vehicle teleport to fail. That might be what is happening. I don't really have time to test it out, though.

Could you have someone try crossing the border again with the boat, and then assuming the same problem occurs with the boat not showing up on the other side, then get in another boat and ride back across the border again? If the second crossing works correctly, that would verify it being a problem with the chunk not being loaded and I could try to make a workaround.

commented

I played around with this some. I had remount ticks set to 0 because of the cautionary documentation associated with it, but I enabled it and it actually seemed to help. The problem seems to be the boat velocity is continuing along its previous heading. This makes no sense because at BorderCheckTask.java#L88, the entire boat is removed. I'll toyed around with setting the orientation (yaw) of the boat and/or setting its velocity equal to that of the player, but I didn't manage to get it quite right. I'll see if I can't figure it out since you don't have time, but with Fallout and Starcraft coming out on Tuesday, I don't think I'll have much time either :)