Decode vanilla blockstate variants and multipart conditions

This commit is contained in:
Ludovic Marie
2026-10-06 21:16:15 +02:00
parent b3a508dba8
commit 54a2b552ee
10 changed files with 469 additions and 1 deletions
+14
View File
@@ -129,6 +129,20 @@ transparency classification, actual tint/light evaluation and GPU rendering
remain separate from the geometry result. Other operating systems still need
their native validation runs.
Blockstate resources now decode into ordered variant selectors and multipart
conditions. The [native blockstate comparison](../benchmarks/rust-blockstate-model-decoding-2026-10-06/scoped-parity.json)
covers all 1,288 bundled definitions and 1,351 synthetic cases (2,639 total,
468 expected rejections). It uses the same `StrictJsonParser` and
`BlockStateModelDispatcher.CODEC` as the pinned loader. The Rust representation
preserves single versus weighted variants, all three quarter-turn axes, UV-lock
flags, positive weights and total-weight limits, ordered selectors, nested
AND/OR conditions and per-term negation. Registry binding, property selection,
random draw consumption and transformed baking remain separate work.
```sh
python3 tools/test_blockstate_model_parity.py
```
The sprite animation module reproduces the pinned metadata codec's integer
conversion, strict primitive types, optional null fields and frame dimensions.
It preserves repeated frames, filters out-of-image frame indices, and treats
+3 -1
View File
@@ -19,7 +19,9 @@ block-model JSON files and 2,457 synthetic cases compared against the actual
client parser. [Decoder scope and validation](native-client.md#validation)
also include parent/texture resolution over 5,648 roots and cuboid baking over
7,100 roots with identity blockstate transforms. Blockstate selection, transformed
models and UV locking remain unfinished. The native renderer now draws an
models and UV locking remain unfinished. Blockstate resource decoding now
matches all 1,288 bundled definitions and 1,351 synthetic cases; registry
binding and model selection are not yet connected to the renderer. The native renderer now draws an
inspection gallery from the decoded/resolved/baked models, including binary
cutouts and stepped lantern animation; these are not yet gameplay blocks.
Animation metadata, frame sequences and tick-state selection now have native