跳转至

Animation

文档版本:1.21.0.24

Animation for behavior for.

架构

animations:
{
  format_version "format_version"
  object "animations" : opt
  {
    object "^animation\.[a-z\.]+" : opt
    {
      number "animation_length" : opt
      boolean "loop" : opt
      object "timeline" : opt
      {
        string "^(\d+\.\d+|\d+)$" : opt
        string "^(\d+\.\d+|\d+)$" : opt
        string "^(\d+\.\d+|\d+)$" : opt
        string "^(\d+\.\d+|\d+)$" : opt
        array "^(\d+\.\d+|\d+)$" : opt
        {
          string "<any array element>" : opt
        }
      }
      0 "anim_time_update"
    }
  }
}
format_versionformat_version
format_version:
string
animationsobject
The animation specification.
animations
^animation\.[a-z\.]+object
A single animation definition for.
^animation\.[a-z\.]+
animation_lengthnumber
The time in seconds this animation will last.
loopboolean
Whenever this animation should loop once it reaches the end, will only happen if the animation is still active.
timelineobject
A timeline specification, property names are timestamps.
timeline
^(\d+\.\d+|\d+)$string
Sets the value to a molang variable.
^(\d+\.\d+|\d+)$string
Executes a minecraft command.
^(\d+\.\d+|\d+)$string
The event or commands to execute.
^(\d+\.\d+|\d+)$string
An event to be called upon within the executing entity.
^(\d+\.\d+|\d+)$array
^(\d+\.\d+|\d+)$
<any array element>string
The event or commands to execute.
anim_time_update0
How does time pass when playing the animation. Defaults to query.anim_time + query.delta_time which means advance in seconds.
0:
string
0:
number