test
Confirmed 24w09a, cannot use numpad home/end to navigate chat and command blocks as example
This bug was partially fixed in 23w13a. The issue with animation leaking is resolved, but the desync still happens. The best way to reproduce this is with the 20hz demonstrations, along with holding down the pause (ESC) button.
So, based on this finding, the best map-making workaround at the moment to ensure a reliable animation is:
If you specify an interpolation_duration, the duration must be less than or equal to the total ticks from the last animation, to ensure the 'ghost animation' is fully finished
Example:
If at 40 ticks from the last animation, you create an animation with > 40 duration, it will highly likely fail interpolation
If at 40 ticks from the last animation, you create an animation at <= 40 duration, it will succeed
*However, the caveat is that, even if you do it right, it might still desync and do something else unexpected*
From my understanding, this is a result of two different bugs happening together.
1. Animation leaking. Mid-animation interpolation is fundamentally broken, as it is prone to leaking and ghost-animating the previous animation instantaneously using the duration of the current animation, before starting the next animation, even if the previous animation is already finished.
2. Multiple animations from desync. The game can desync, for example, depending on how much the user pauses. This then becomes evident when a transform animation is applied, which can cause animations to behave in multiple different ways based on how desynced they are.
I did one more experiment to verify if my understanding is correct, outlined below:
Video: https://bugs.mojang.com/secure/attachment/527204/desynctest11.mp4
Assume we NBT summon (not execute/data merge in same tick) without specifying transform or interpolation at all
at 30 ticks, we try to initialize the animation with scale 2, translation 0,2,0, start 0, duration 0
at 40 ticks, we do an animation to scale 1, translation 0,0,0 with start 0, duration 20
The game will animate from scale 2, translation 0,2,0 to scale 1, translation 0,0,0 across 20 ticks immediately, but get cut off at 40-30=10 ticks (this happens instantaneously before the tick 40 animation starts)
The animation will then start from scale 1.5, translation 0,1.5,0 and THEN start animating to scale 1, translation 0,0,0 over 20 ticks
The video displays this phenomenon EXACTLY as described above, however, the first loop seems to animate the 80 duration animation instantly, resulting in no animation at all. This was unexpected. The second loop illustrates the above description precisely.
I was never able to observe the actual intended animation. Something with the normal function of interpolation animation does not work properly.
Repro:
In a repeating command chain:
scoreboard players add @e[tag=loop] test 1
execute as @e[tag=loop,scores={test=20}] run data merge entity @s {transformation:{translation:[0f,2f,0f],scale:[2f,2f,2f]},start_interpolation:0,interpolation_duration:0}
execute as @e[tag=loop,scores={test=40}] run data merge entity @s {transformation:{translation:[0f,0f,0f],scale:[1f,1f,1f]},start_interpolation:0,interpolation_duration:80}
Then:
/scoreboard objectives add test
/summon block_display ~ ~1 ~ {block_state:{Name:"stone"},Tags:[loop]}
This is somewhat major issue as simply starting from a non-default transformation now becomes very difficult to make reliable: https://bugs.mojang.com/secure/attachment/527194/desynctest7.mp4
This repro is:
In a repeating command block chain
scoreboard players add @e[tag=loop] test 1
execute as @e[tag=loop,scores={test=21}] run data merge entity @s {transformation:{translation:[0.0f,0.0f,0.0f],scale:[0.1f,0.1f,0.1f]},start_interpolation:0,interpolation_duration:0,block_state:{Name:"stone"}}
execute as @e[tag=loop,scores={test=41}] run data merge entity @s {transformation:{translation:[2.0f,0.0f,0.0f],scale:[0.1f,0.1f,0.1f]},start_interpolation:0,interpolation_duration:40}
execute at @e[tag=loop,scores={test=81..}] run summon minecraft:block_display ~ ~ ~ {Tags:[loop]}
kill @e[tag=loop,scores={test=81..}]
Then run
/scoreboard objectives add test dummy
/summon minecraft:block_display ~ ~1 ~ {block_state:{Name:"stone"},Tags:[loop]}
This one is trying to best case it: I don't set the initial transformation until a full 20 ticks after summon, but still I cannot make a reliable starting animation. It still jumps to a different unexpected scale at tick 41 that is halfway between the default transformation and the transformation at tick 21.
FYI interpolation can be specified in the first command and it will still repro. The issue is unrelated to not setting those values.
Occasionally I can repro but a few rare times it works properly, but depends on where I spawn the block display. I believe the issue you're describing manifests occasionally when desync occurs and may be the equivalent of MC-260874. I believe there's some desync occurring between when the summon happens and when the data merge happens in the first command. Possibly doing your repro after triggering desync or running it on 20hz may make it visible. May be alright to keep this bug separate for now as this is a very simple repro.
Confirmed 1.19.4-rc1
Same behavior with forceloaded chunk would be observed as they work the same.