playanimationの構文
#playanimation
playanimation <entity: target> <animation: string> [next_state: string] [blend_out_time: float] [stop_expression: string] [controller: string]
<entity: target> アニメーションを再生するエンティティを指定します。
<animation: string> 再生するアニメーションを指定します。
[next_state: string] アニメーション終了条件を満たしたとき、どのアニメーションに移行するかを指定します。
[blend_out_time: float] アニメーションの移行にかける時間を指定します。
[stop_expression: string] 終了条件を書きます。molangである必要があります。
[controller: string] アニメーションコントローラーにアクセス、定義します。
例
/playanimation @a animation.player.riding.legs none 0 "query.is_moving"
これは、プレイヤー全員にanimation.player.riding.legs(プレイヤーが座るときの足のアニメーション)を再生し、query.is_moving(動いているとき)が真になったらnoneというアニメーションに0秒で移行します。
この場合、noneというアニメーションは存在しないため、何もない状態に移行します(つまりアニメーションが解除される)
アニメーションは、そのエンティティのアニメーションの場合、animation.エンティティ.の部分を省略できます。
たとえば、プレイヤーにanimation.player.attack.positionsというプレイヤーのアニメーションを再生させる場合、animation.player.を省略し、attack.positionsと書くことができます。