Minecraft:Timeline
More actions
Template:For Template:Exclusive
Timelines control game behavior and visuals based on the absolute day time through Minecraft:environment attributes.
JSON format
- Template:Nbt: The root element of the timeline.
- Template:Nbt: Optional. Defines the duration in ticks over which the timeline will repeat. If omitted, the timeline will not repeat.
- Template:Nbt: Template:Json ref to use for this timeline.
- Template:Nbt: A map between namespaced Minecraft:environment attribute IDs and a corresponding attribute track object.
- Template:Nbt: An attribute track.
- Template:NbtTemplate:Nbt: The easing type used to ease the interpolation between keyframes. Either a Template:Nbt string name of the interpolation type (see below) or an Template:Nbt object with the field listed below. Default is Template:Code. Note that easing only has an effect for attributes which support interpolation.
- Template:Nbt: A list of 4 Template:Nbt doubles providing the coordinates of the 2 control points in the order x1, y1, x2, y2. Each of these coordinates must be between 0 and 1 (inclusive).
- Template:Nbt: The ID of an environment attribute modifier. The default is Template:Code.
- Template:Nbt: A list of keyframes for the track.
- Template:Nbt: A keyframe.
- Template:Nbt: A value between 0 and Template:Code (if specified) which defines the tick within the period at which the keyframe's value will be active.
- Template:Nbt: The value for the attribute modifier.
- Template:Nbt: A keyframe.
- Template:NbtTemplate:Nbt: The easing type used to ease the interpolation between keyframes. Either a Template:Nbt string name of the interpolation type (see below) or an Template:Nbt object with the field listed below. Default is Template:Code. Note that easing only has an effect for attributes which support interpolation.
- Template:Nbt: An attribute track.
- Template:Nbt: Map defining Minecraft:time markers.
- Template:NbtTemplate:Nbt: Definition of a time marker. Either an Template:Nbt integer representing the tick of the marker or an Template:Nbt object with the following fields:
- Template:Nbt: The tick of this marker.
- Template:Nbt: Whether this marker should be suggested for the Template:Cmd command. Defaults to
false.
- Template:NbtTemplate:Nbt: Definition of a time marker. Either an Template:Nbt integer representing the tick of the marker or an Template:Nbt object with the following fields:
Easing types
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 |
|---|---|
| Template:Code | Always selects the value from the previous keyframe. |
| Template:Code | Linearly interpolates between the previous and next keyframes, also known as Template:W. |
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; Template:Code, Template:Code, and Template:Code. Template:Code applies the easing from the value of a keyframe after it's been passed, Template:Code applies the easing into the value of a keyframe before it's been passed, and Template:Code combines the two and applies the easing both from a keyframe and into the next one.
The types of easing which support Template:Code, Template:Code, and Template:Code are as follows:
| Interpolation kind | Ease in | Ease out | Ease in and out | Easing behavior | Ease-out formula |
|---|---|---|---|---|---|
| Template:Code | Template:Code | Template:Code | Template:Code | Pulls back beyond the target value before easing into it. | <math>y = 1 + 2.70158 (x - 1)^3 + 1.70158(x - 1)^2</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | Bounces against the target value 3 times before stopping. | <math>f(x) = \begin{cases}
7.5625 x^2, & \text{if }0 \le x < \frac4{11} \\
7.5625 \left(x - \frac6{11}\right)^2 + \frac34, & \text{if }\frac4{11} \le x < \frac8{11} \\
7.5625 \left(x - \frac9{11}\right)^2 + \frac{15}{16}, & \text{if }\frac8{11} \le x < \frac{10}{11} \\
7.5625 \left(x - \frac{21}{22}\right)^2 + \frac{63}{64}, & \text{if }\frac{10}{11} \le x \le 1
\end{cases}</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | Uses a circular curve to ease into the target value. | <math>y = \sqrt{1 - (x - 1)^2}</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | Wobbles around the target value 4 times. | <math>y = 2^{-10 x} \sin\left(\frac{2 \pi}3 (10 x - 0.75) \right) + 1</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | Eases into the target value with a sinusoidal curve. | <math>y = \sin\left(\frac{\pi x}2\right)</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | A quadratic curve with its origin at the target value. | <math>y = 1 - (1 - x)^2</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | A cubic curve with its origin at the target value. | <math>y = 1 - (1 - x)^3</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | A quartic curve with its origin at the target value. | <math>y = 1 - (1 - x)^4</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | A quintic curve with its origin at the target value. | <math>y = 1 - (1 - x)^5</math> |
| Template:Code | Template:Code | Template:Code | Template:Code | An exponential curve with its origin at the starting value. | <math>y = 1 - 2^{-10 x}</math> |
History
Template:Navbox Java Edition technical
Minecraft:de:Zeitleiste Minecraft:ja:タイムライン Minecraft:pt:Linha do tempo Minecraft:zh:时间线定义格式