The bug
Mounting a vehicle (like a minecart, a boat, a pig or a horse) and quickly dismounting it does not teleport the player to the vehicle but only dismounts them relative to their position.
Expected behavior
The player would be properly moved to the vehicle first and then dismounted at the position of the vehicle.
How to reproduce
- Stand in front of a vehicle
- Mount the vehicle (default: right-click)
- Quickly dismount it (default: shift)
Code analysis
Based on 1.12 decompiled using MCP 9.40 PRE 1
It looks like this bug can be caused by two different bugs:
- The passenger position is not directly updated but instead by the method net.minecraft.entity.Entity.updatePassenger(Entity) one tick later (see also
MC-111747). - The server sends a SPacketPlayerPosLook packet with the old entity position in net.minecraft.entity.player.EntityPlayerMP.startRiding(Entity, boolean).