Timelines
Timelines control game behaviour and visuals based on a world clock through environment attributes. They define tracks that animate environment attributes over time using keyframes and easing functions. Optional named time markers act as labelled tick positions inside a timeline.
Timelines were added in snapshot 25w45a (Minecraft 1.21.11).
For a broader overview that covers world clocks, the /time command, and the timeCheck predicate condition together, see World Clocks.
Basic Usage
Every timeline must be bound to a WorldClockArgument. Register a clock first, then pass it when creating the timeline:
The timeline function creates and registers a timeline in your DataPack. It produces a file at data/<namespace>/timeline/<fileName>.json and returns a TimelineArgument.
Timeline Properties
| Property | Type | Description |
|---|---|---|
clock |
WorldClockArgument |
Required. The world clock this timeline reads from. |
periodTicks |
Int? |
Duration in ticks before the timeline loops. Omit for a one-shot timeline. |
timeMarkers |
Map<String, TimelineMarker>? |
Named tick positions inside this timeline. See Time Markers. |
Tracks
Tracks map environment attributes to keyframe-based animations. Each track specifies an easing type, an optional modifier, and a list of keyframes.
Track Properties
| Property | Type | Description |
|---|---|---|
ease |
EasingType |
The easing type for interpolation between keyframes. Default: linear |
modifier |
EnvironmentAttributeModifier |
The environment attribute modifier ID. Default: OVERRIDE |
keyframes |
List |
A list of keyframes defining values at specific ticks |
Keyframes
Each keyframe defines a value at a specific tick within the timeline period:
The value function accepts Float, Int, Boolean, String, Color, or any EnvironmentAttributesType (e.g., FloatValue, BooleanValue, ColorValue).
Using typed values with EnvironmentAttributesType:
Time Markers
Time markers are named tick positions inside a timeline. Commands can jump a clock to a marker position via /time set <timeMarker>, and they appear in command auto-complete when showInCommands is true.
Reference a marker in a function using TimeMarkerArgument:
See World Clocks - Time Markers for the full command usage.
Easing Types
Easing types control how values are interpolated between keyframes.
Non-interpolating Types
| Easing Type | Description |
|---|---|
Constant |
Always selects the value from the previous keyframe |
Linear |
Linearly interpolates between keyframes (lerp) |
Interpolating Types
Each interpolation kind is available in three forms: In*, Out*, and InOut*.
| Kind | Ease In | Ease Out | Ease In-Out |
|---|---|---|---|
| Back | InBack |
OutBack |
InOutBack |
| Bounce | InBounce |
OutBounce |
InOutBounce |
| Circ | InCirc |
OutCirc |
InOutCirc |
| Cubic | InCubic |
OutCubic |
InOutCubic |
| Elastic | InElastic |
OutElastic |
InOutElastic |
| Expo | InExpo |
OutExpo |
InOutExpo |
| Quad | InQuad |
OutQuad |
InOutQuad |
| Quart | InQuart |
OutQuart |
InOutQuart |
| Quint | InQuint |
OutQuint |
InOutQuint |
| Sine | InSine |
OutSine |
InOutSine |
Cubic Bezier
For custom easing curves, use CubicBezier with two control points:
This serializes as:
Environment Attributes
Tracks reference environment attributes from the EnvironmentAttributes sealed interface, organized into categories:
EnvironmentAttributes.Audio- Sound-related attributes (ambient sounds, music volume, etc.)EnvironmentAttributes.Gameplay- Gameplay mechanics (monster burning, bed rules, sky light level, etc.)EnvironmentAttributes.Visual- Visual effects (fog, clouds, sky color, particles, etc.)
Complete Example
Here's a complete example of a day/night cycle timeline:
See Also
- World Clocks - Clocks, time markers, the
/timecommand, andtimeCheck - Environment Attributes - Environment attributes used in timeline tracks
- Tags - Use tags to group timelines
External Resources
- Minecraft Wiki: Timeline - Official JSON format reference
