Description:
When teleporting a player every tick relative to a stationary entity, the player's client can move around freely after the first teleport, but the server sees the player as still being at that entity. When the repeating command stops, it seems like the server snaps the player's location to what the player's client sees. To reproduce, use a command like /execute at @e[type=armor_stand, name=tpTest, limit=1] run tp @p[tag=tpTest] ~ ~ ~
running every tick.
Steps to Reproduce:
Start up a server in any version after 1.13
Connect to the server, not through localhost, as the bug only happens when the player has some ping
Run /summon armor_stand ~ ~ ~ {CustomName:'"tpTest"'}
Set up a repeating command running /execute at @e[type=armor_stand, name=tpTest, limit=1] run teleport @p[tag=lock] ~ ~ ~
Give yourself the tag with /tag @s add lock
Walk around
Have someone else on the server verify that your character is stationary or set up commands to display your position on the server
Observed Results:
The player can walk around freely, while the server thinks they are stationary.
Expected Results:
The player should be kept in the same location, effectively locking their movement.
Videos:
I attached a video displaying the bug in 1.18.2 and another in 22w13a. I also showed how connecting to localhost results in different behavior in the second video.
Notes:
Notably, this bug does not happen when the player is teleported continuously to absolute coordinates.
Attachments
Comments 7
Is this still an issue in the most recent versions (currently that is 1.15, or the latest pre-release 1.15.1-pre1) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.
I'm not sure how reopening a bug report works. I added 1.15 to the affected versions a couple days after it was suggested I do so. I recently revisited a project that required this bug to be fixed and recalled this bug report I made, so I also just edited it to add a video demonstration and include 1.18.2 in the affected versions. Can this issue be reopened?
I just tested the bug in the latest snapshot, 22w13a, as well, and it had the same behavior. Also of note, I found that the bug only happens if the player has some ping. When connected through localhost, the command has the intended behavior.
Hey there, thanks for testing. I'm curious, does MC-197855 describe your issue? I know it's much newer than yours but it seems to be gaining some traction and we could move it over there
That post does seem to describe the same issue, and it is more thoroughly tested. However, the fix that was suggested there doesn't sound like it would fix the issue I am having, which is being unable to restrict player movement by repeated teleports. Should I post a comment there explaining my perspective?
I experienced this phenomena in an older version by teleporting the player 0.000000001 or so blocks away from their current position. This no longer works anymore. Could you tell me how to recreate this effect in modern versions?