Skull item selectors v14
本页目录
本文对应 1.21.10 现代框架。文档中的接口与配置按当前文档快照核对;完整框架仍在开发验收。接口可编译、配置可解析与游戏内效果验证分别记录。
Decision: ADR-026(源码配套资料). Progress is recorded only in the delivery ledger, R4 skullItemsSlice.
Use ModelPlan schema 14, capability model_skull_items_v14, and the existing ModelService.Owner.bindItem/patchItem/unbindItem or domains.model.items entry. Item match schema 2 selects a skull candidate by either identity or condition:
{
"schemaVersion": 2,
"identity": {"skullType": 3, "profileName": "Framework_Head"},
"displayNames": ["Example sculpture"]
}
identity uses the four-field block Match contract: required skullType (-1 through 6), optional canonical profile UUID, exact profile name and texture substring. Its matching semantics remain those of the simple block identity. condition is an alternative using the existing item-condition v6 dialect, including item, name, lore, native component and skull facts. It must not appear together with identity.
displayNames is optional, with at most eight distinct nonempty strings of at most 240 characters. No fallback name is inferred from id. Only a native skull item or a nonempty item with a modern PROFILE component is eligible, including for fallback. A wrapped PROFILE uses player type 3. Only an explicit custom name is considered; component style is omitted and legacy section-sign formatting codes are removed before exact case-insensitive comparison. An arbitrary renamed stick without PROFILE never matches.
Complete conditional matches score 1000; simple identities score 100 plus specificity; name fallback scores 10. Priority is compared before score, then stable ID. Ordinary item rules retain score 100 and their existing relative order. Skull selectors conservatively claim all items at their priority, so another owner cannot register an overlapping priority. Scope, observer receipts and prepared commit semantics are unchanged.
Each selection shares a 524288-step skull budget; each skull rule allows 131072 steps. Optional item conditions also consume the existing v6 shared budget. Native facts and fallback strings have fixed limits. An error is diagnostic and returns native rendering without selecting a lower owned or local rule. Missing capabilities and invalid prepared resources fail before replacement. Data or selector changes do not recreate unrelated profiles or behavior instances.
Profiles explicitly choose source_item (BBModel/Bedrock) or java_item and retain their existing view, transform and resource contracts. Block and item profiles are separate values because their render contexts differ. This selector does not imply V1 skull-specific hitbox defaults, transient item actions or Java default-stack/GROUND-display equivalence. Migration must report those remaining differences and convert legacy nested SkullOwner data to explicit modern PROFILE components.