mojira.dev
MC-90686

Teleporting entities in the same tick they are spawned may cause desync

Under certain circumstances, summoning an entity and teleporting it in the same tick causes the entity to visually remain where it was spawned. Having liquid at the teleport destination seems to guarantee the bug, though the duration is variable. Observed durations until the bug corrects itself range from 1 to 10 seconds.

The entity can be interacted with by the player at its visual location, and by the rest of the world at its actual location. Sounds will come from the entity's actual location. If the entity moves while bugged, the movement will appear relative to the entity's visual location. Death of the entity seems to guarantee correction. Delaying the teleportation by any amount of ticks prevents the bug.

To reproduce:

1. Place two regular impulse command blocks next to each other.

2. Set the first's command to

/summon Villager

3. Set the second's command to

/tp @e[type=Villager] ~ ~ ~4

(you can change the destination)
4. Place liquid at the /tp command's destination.
5. Place a button on the first command block.
6. Press the button.
The bug has a semi-random duration, so you may need to repeat step 6 to get a good look at it.

Note that this affects every version from 1.8 (when the entity selector was added) forwards, but the bug tracker accepts only the versions listed.

Linked issues

Attachments

Comments 2

Josh Lee

How do you even find this stuff...

AjaxGb

@Josh Lee
I originally found it while trying to teleport Endermites into the void for easy cleanup, but I can't seem to reproduce that specific case. The liquid thing is pretty stable.

AjaxGb

(Unassigned)

Unconfirmed

Minecraft 1.8.8, Minecraft 15w42a

Retrieved