ShadowUI 使用文档

Source block authored events v12

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

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

Decision: ADR-024(源码配套资料). Progress: R4 blockEventsSlice in the delivery ledger.

Set profile.source.authoredEvents:true on a typed BBModel/Bedrock block binding. ModelPlan serializes schema 12 and requires model_block_events_v12 in addition to the existing source-block capabilities. Omitted/false remains canonical v10 with identical bytes/digest. Schema 11 is reserved for the independent v11 command contract and is not a model plan version. Public owner bind/patch operations and versioned profile model domains use the same value. Existing model:block_action controls the configured events without a second protocol.

The source compiler accepts BBModel effect animator sound/particle keyframes and Bedrock sound_effects/particle_effects. Exact clip names, at most 16 sounds and 16 particles per clip, 512 events per model, and finite event seconds inside a positive clip duration are required. Particle locators resolve to unambiguous decoded nodes; inherited-scale locator variants, timeline/custom instructions and time-warp metadata are rejected. Particle pre-effect scripts retain the existing bounded expression environment; no Java, files or custom network access is added.

Events follow the accepted default, primary queue segment and up to four parallel layers. Each layer crosses event times once, with at most the latest occurrence of each event after a skipped interval. Entire queue segments skipped between displayed frames are not replayed. Restart begins a new event epoch. A non-restarting update of the same active primary preserves its crossing cursor. Default playback resumed after an action starts from its current profile clock without replaying interrupted events. Transitions affect pose but do not run two sets of events.

Spatial sound uses the accepted block placement origin; a particle with a locator uses that node's accepted world transform. Unlocated particles use the accepted placement root. At most 256 block event dispatches per client tick are attempted across all rules; excess occurrences are consumed and diagnosed. Native sound and simulation budgets still apply. No anchor is derived from a camera-relative matrix or a fake entity.

Output belongs to one real block and layer. Layer replacement, explicit stop, block removal/replacement, owner release, resource retirement, clear, world change and instance expiry release its sounds/emitters. More than two ticks without a fresh accepted draw suspends output; resuming skips missed events. Event clocks advance at most once per client tick. Dispatch errors are recorded and consumed, preserving displayed geometry and preventing per-frame retries.

Native sound dispatch alone does not acknowledge decoding/audibility. Particle admission alone does not acknowledge drawing. Native fixtures must independently verify decoding, actual drawing/position and per-owner cleanup. Human acceptance and migration remain distinct gates.