PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
10.04k stars 2.34k forks source link

ArmorStand teleportation desync #9958

Closed ImGxrke closed 5 months ago

ImGxrke commented 1 year ago

Expected behavior

Im currently developing a vehicle plugin and I am teleporting the seats every tick to their offset position from the main armorstand. I expect them to be like in this image.

2023-11-21_22 33 30

Observed/Actual behavior

However, when driving out of the render distance of a player and entering it again, the armorstands are desynced with the player like in this picture.

2023-11-21_22 35 29

After a few seconds the armorstands fix themself.

Steps/models to reproduce

  1. Teleport an armorstand slowly out of the render distance,
  2. Teleport it back slowly

Plugin and Datapack List

Citizens, FAWE, spark

Paper version

> version
[22:41:40 INFO]: Checking version, please wait...
[22:41:40 INFO]: This server is running Paper version git-Paper-297 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 250388d)
You are running the latest version
Previous version: git-Paper-"250388d" (MC: 1.20.2)

Other

This spigot post actually shows up the same issue, in case my explanation was a bit unclear.

Owen1212055 commented 1 year ago

Thanks for your report! Will take a peak at this, in general when teleporting entities to a location close to themselves they instead send position packets "relatively", so in the case that their initial position becomes desynced, it can obviously cause stuff like this to happen.

ImGxrke commented 1 year ago

I managed to fix the problem by lowering the telportDelay in the ServerEntity. I don't think this is the best soulution but it works in my case.

belnek commented 3 months ago

Sorry for bringing up an old topic, but is there any adequate solution to this problem now? I came across this in version 1.20.4, and so far I have not found a single working solution for myself.

ImGxrke commented 3 months ago

The bug was fixed in 1.21-pre1 (https://bugs.mojang.com/browse/MC-170907)

Owen1212055 commented 3 months ago

Paper might have reverted this due to an exploit, not fully sure tho.

I know we have some diff in server entity so id need to look again.

belnek commented 3 months ago

I would not like to move the server to 1.21. Tell me, please, is there now an opportunity or a patch to solve the problem on 1.20 4?..

electronicboy commented 3 months ago

1.20.4 is unsupported, you are more than welcome to maintain such a thing in your own fork, but, as far as we're concerned, you're on your own

belnek commented 3 months ago

Ok, thank you and sorry.