Entity riding an entity can cause location/coordinate desync
The bug
When a saddled pig rides a minecart and then the player rides the pig, a desync will happen if the minecart dies and pig is still alive. However, since 21w05a, a new method is needed. It seems to only work now if the pig your riding gets moved into an unloaded chunk while riding the dead minecart. This can either be achieved by using tnt or a tp and kill command. Here I will show a simple /tp and /kill method, but the tnt method produces a more noticeable desync than just the /tp and /kill method. I will post a video showing the tnt and showing the /tp & /kill method.
How to reproduce
- Create a world and summon a saddled pig riding a minecart:
/summon minecraft:minecart ~ ~4 ~ {Passengers:[{id:pig,Saddle:1,Invulnerability:0}]} - Ride the pig
- Grab some command blocks.
- Enter this command to kill the minecart quickly:
/kill @e[type=minecraft:minecart,limit=1,sort=nearest]
- In another command block that will come after the /kill command enter the following command:
/tp @e[type=pig,limit=1,sort=nearest] 10000 100 10000
- Your position will be different than the your player client. To check this, run this:
/data get entity @s Pos
as well as check your f3 screen for your client coordinates
Videos
Tnt methods
Result 1: https://youtu.be/AhEzkJxQwDo
Result 2: https://youtu.be/aBG3BjK4cRo
Tp method:
Result 1: https://youtu.be/1aE4IbkSgrA
2020-10-06, 07:19 PM
2023-03-22, 09:35 PM
2023-03-15, 11:08 AM
10
7