ShadowUI 使用文档

Actor actions v22

状态待核对Minecraft 1.21.10 · Forge / Bukkit
本页目录

本文对应 1.21.10 现代框架。文档中的接口与配置按当前文档快照核对;完整框架仍在开发验收。接口可编译、配置可解析与游戏内效果验证分别记录。

Decision: ADR-034(源码配套资料). Authoritative status: delivery ledger R4 actorActionsSlice.

ActorAnimationCommand addresses an existing entity or player binding by owner-local ID. ModelService.Owner.actorAction(command) returns a request ID queried through actionStatus(context, request). Each current observer must support model_actor_actions_v22 and have the owner's current model revision committed with ready resources. Configuration uses model:actor_action and declares the same capability. These actions do not change the model document or rebuild its behavior instance.

JSON
{"operation":"play","binding":"body","clip":"wave","loop":false,"speed":1,"restart":true,"transitionSeconds":0.2}

Stop is {"operation":"stop","binding":"body"}. Play defaults are loop false, speed 1, restart true and transition 0.25 seconds. Speed is 0.05–16; transition is 0–2 seconds. Unknown fields, nulls, nonfinite numbers and malformed IDs/clips are rejected. Queue/parallel fields are not part of this single-clip primitive. Stop restores the backend's ordinary state playback and clears command event tracks.

Optional soundEvents and particleEvents use the existing platform-free protocol event values, at most 16 per channel. Native preparation validates clip duration, resources and node names before replacing playback. Absent source-player tables follow the profile's authored-event policy; explicit empty arrays disable that command's corresponding event channel. No business permissions, damage, skill state or entity lifecycle are inferred.

Actions share ordered delivery and a 16-request-per-observer pending limit with item/block actions. Duplicate envelopes return their recorded receipt; stale owner/session/model/resource identities fail without execution. A receipt means native command admission, not proof that an observer rendered the target. Failed actions retain the applied model and prior valid command. New observers, resource recovery and clear/resync require a new action request; retired actions are never replayed.

ModelPlan schemas 2–21 and older action interfaces remain unchanged. Runtime-native, configuration reuse, recovery, migration and human acceptance are recorded separately; this contract does not declare full R4 completion.