mojira.dev
MC-276459

Item display rotation wrapping does not interpolate cleanly

Rotating an item display with /tp and setting its teleport_duration to a nonzero number causes it to do a full rotation when it hits 0/360 degrees yaw.

This only seems to happen if the last interpolation animation was done in the same direction, and after testing with slower teleport_durations, it seems to occur when the interpolated value reaches 0/360 rather than the actual value, making it occur at the same speed regardless of teleport_duration.

To Reproduce:

Summon an item display with a teleport_duration

/summon item_display ~ ~ ~ {Rotation:[0f,0f],item:{id:"player_head"},item_display:"fixed",teleport_duration:1}

Add a repeating command block that continuously rotates the entity around the y-axis

execute as @n[type=item_display] at @s run tp @s ~ ~ ~ ~5 ~

Turn on hitbox rendering (F3+B) so it's easiest to see the facing direction

The entity completes a circle, and upon reaching yaw 0/360, quickly completes another full rotation.

Linked issues

Attachments

Comments 1

mesoscopic

gegy

Confirmed

Platform

Low

Rendering

command

1.21.1, 24w36a

24w38a

Retrieved