mojira.dev
MC-306961

Precision loss occurs in timeline interpolation when the tick distance between two adjacent keyframes exceeds 16777216

When the tick distance between two keyframes in a timeline exceeds approximately 16777216, "jumping" occurs in the value interpolation once the current tick progresses more than 16777216 ticks away from the starting keyframe of the current interval. As the time value increases, these jumps become more pronounced. This appears to be a precision issue caused by internal float32 limitations.

This issue may appear similar to MC-302134, but it targets a different system. While MC-302134 is about the /time set command's input handling, this report focuses on the internal interpolation math of the timeline system. Even when the time values are technically accurate, the timeline fails to perform smooth interpolation when the tick distance between two adjacent keyframes is too large.

Steps to Reproduce:

  1. Create a timeline as follows and apply it to the overworld (or use the attached datapack).

{
  "clock": "minecraft:overworld",
  "tracks": {
    "visual/cloud_height": {
      "keyframes": [
        { "ticks": 0, "value": -200000000 },
        { "ticks": 2147483647, "value": 1947483647 }
      ]
    }
  }
}
  1. Create a superflat void world (to ensure a clear view of the clouds), and execute the command /time set 200000000.

  2. Observe the movement of the clouds. You will notice the value "jumping" every 16 ticks.

Attachments

Comments 1

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Triton365

(Unassigned)

Confirmed

(Unassigned)

1.21.11, 26.1 Release Candidate 2

Retrieved