Block visibility v21
本页目录
本文对应 1.21.10 现代框架。文档中的接口与配置按当前文档快照核对;完整框架仍在开发验收。接口可编译、配置可解析与游戏内效果验证分别记录。
Decision: ADR-033(源码配套资料). Status/evidence: delivery ledger R4 blockVisibilitySlice.
BlockModelProfile accepts optional visibility: "loaded" | "section". Only loaded changes behavior and requires model plan schema 21 plus model_block_visibility_v21. Omitted/section emits no extra field and keeps prior plan digests and capability requirements. Other values, types and null are rejected. This field is valid for all three existing placed-block renderers: gltf, source_model and java_item.
Loaded mode considers matching native skulls in already loaded chunks even when their section is outside the native visible-section list. The native skull bounding box must still intersect the view frustum, its center must remain less than 64 blocks from the camera, and ordinary depth testing remains. It does not extend geometry bounds, force chunk loading, bypass distance/fog/depth or expose unseen chunks. V1 renderMode 2/global/always migrates to this explicit choice; mode 1 migrates to the default.
The selected rule controls visibility, including a higher-priority section rule shadowing a lower-priority loaded rule. Existing owner bindBlock/patchBlock/replace/clear, profile data resolution and model:block_* script actions remain the entry points. Configuration preparation, resource generations, observer receipts and release remain the existing contracts. Failed candidates retain the previously committed visibility. No new business protocol or inventory/world authority is introduced.
Example profile fragment:
{"renderer":"source_model","modelResource":"example:models/source-bb.model.json","visibility":"loaded","scale":1}
Author checks, native draws, human acceptance and release are recorded separately. This document does not declare R4 or full V1 migration complete.