mojira.dev
MC-272599

teleport_duration interpolates inconsistently and non-linearly at higher values

Teleporting a display entity with a high teleport_duration value doesn't move the entity linearly between the two points as expected. It's very inconsistent but sometimes appear to split the momement into two smaller movements, each with a sometimes drastically different speed. Reproducible in both 1.20.6 and 1.21-rc1.

To reproduce:

/summon item_display ~ ~0.5 ~ {teleport_duration:49,item:{id:"minecraft:stick",count:1}}
/execute as @e[type=minecraft:item_display] at @s run tp @s ~3 ~ ~

Observe how inconsistent the movement is with each teleport.

Linked issues

Attachments

Comments 4

I was able to reproduce on 1.21 Pre-Release 2

I was trying to hunt down this issue for a while and I think it's caused by the server periodically sending out redundant entity move/teleport packets. Every three seconds or so the server will send a packet confirming the location of the entity. This isn't a problem for most entities, but since this packet is treated as a teleportation by display entities, it resets their teleport interpolation progress. This leads to an apparent decrease in speed since it effectively forgets that it was already interpolating and starts again as if it was sitting still.

Still an issue in 1.21.8

Lucy Poulton [Noxcrew]

(Unassigned)

Community Consensus

Platform

Normal

Commands, Entities

1.20.6, 1.21 Pre-Release 1, 1.21 Pre-Release 2, 1.21.7 Release Candidate 2

Retrieved