Timeline

From Minecraft Wiki
Jump to navigation Jump to search
For a timeline of the game's history, see Chronology of events.
This feature is exclusive to Java Edition.
 

Timelines control game behavior and visuals based on the absolute day time through environment attributes.

JSON format

[edit | edit source]
  • [NBT Compound / JSON Object]: The root element of the timeline.
    • [Int] period_ticks: Optional. Defines the duration in ticks over which the timeline will repeat. If omitted, the timeline will not repeat.
    • [String] clock[upcoming JE 26.1]: One world clock (an [String] ID) to use for this timeline.
    • [NBT Compound / JSON Object] tracks: A map between namespaced environment attribute IDs and a corresponding attribute track object.
      • [NBT Compound / JSON Object]: An attribute track.
        • [String][NBT Compound / JSON Object] ease: The easing type used to ease the interpolation between keyframes. Either a [String] string name of the interpolation type (see below) or an [NBT Compound / JSON Object] object with the field listed below. Default is linear. Note that easing only has an effect for attributes which support interpolation.
          • [NBT List / JSON Array] cubic_bezier: A list of 4 [Double] doubles providing the coordinates of the 2 control points in the order x1, y1, x2, y2.
        • [String] modifier: The ID of an environment attribute modifier. The default is override.
        • [NBT List / JSON Array] keyframes: A list of keyframes for the track.
          • [NBT Compound / JSON Object]: A keyframe.
            • [Int] ticks: A value between 0 and period_ticks (if specified) which defines the tick within the period at which the keyframe's value will be active.
            • [NBT Compound / JSON Object] value: The value for the attribute modifier.
    • [NBT Compound / JSON Object] time_markers[upcoming JE 26.1]: Map defining time markers.
      • [Int][NBT Compound / JSON Object] <time marker id>: Definition of a time marker. Either an [Int] integer representing the tick of the marker or an [NBT Compound / JSON Object] object with the following fields:
        • [Int] ticks: The tick of this marker.
        • [Boolean] show_in_commands: Whether this marker should be suggested for the /time command. Defaults to false.

Easing types

[edit | edit source]
This section is a work in progress.
 
Please help expand and improve it. The talk page may contain suggestions.
Note:
Adding graphs for each of the easing types would be helpful.

An easing type specifies the interpolation easing between keyframes of an attribute track.

Two easing types are available which do not interpolate into or out from keyframes:

Easing type Behavior
constant Always selects the value from the previous keyframe.
linear Linearly interpolates between the previous and next keyframes, also known as lerp.

The rest of the easing types are all variations of a set of interpolation kinds, resized and moved to fit each segment of the track. Each is available in three forms; in_, out_, and in_out_. in_ applies the easing from the value of a keyframe after it's been passed, out_ applies the easing into the value of a keyframe before it's been passed, and in_out_ combines the two and applies the easing both from a keyframe and into the next one.

The types of easing which support in_, out_, and in_out_ are as follows:

Interpolation kind Ease in Ease out Ease in and out Easing behavior Ease-out formula
back in_back out_back in_out_back Pulls back beyond the target value before easing into it. y=1+2.70158(x1)3+1.70158(x1)2
bounce in_bounce out_bounce in_out_bounce Bounces against the target value 3 times before stopping. f(x)={7.5625x2,if 0x<4117.5625(x611)2+34,if 411x<8117.5625(x911)2+1516,if 811x<10117.5625(x2122)2+6364,if 1011x1
circ in_circ out_circ in_out_circ Uses a circular curve to ease into the target value. y=1(x1)2
elastic in_elastic out_elastic in_out_elastic Wobbles around the target value 4 times. y=210xsin(2π3(10x0.75))+1
sine in_sine out_sine in_out_sine Eases into the target value with a sinusoidal curve. y=sin(πx2)
quad in_quad out_quad in_out_quad A quadratic curve with its origin at the target value. y=1(1x)2
cubic in_cubic out_cubic in_out_cubic A cubic curve with its origin at the target value. y=1(1x)3
quart in_quart out_quart in_out_quart A quartic curve with its origin at the target value. y=1(1x)4
quint in_quint out_quint in_out_quint A quintic curve with its origin at the target value. y=1(1x)5
expo in_expo out_expo in_out_expo An exponential curve with its origin at the starting value. y=1210x

History

[edit | edit source]
Java Edition
1.21.1125w45aAdded timelines to data packs.
Upcoming Java Edition
26.1snap3Added a clock field
Added an optional time_markers field
[edit | edit source]