[PR #5422] [MERGED] Expand content block model states for declared properties #6278

Closed
opened 2026-11-03 06:17:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5422
Author: @arismoko
Created: 10/31/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: content-state-fanout


📝 Commits (2)

  • 4efd95d Expand content block model state definitions
  • 7fbe0ef Merge remote-tracking branch 'upstream/main' into content-state-fanout

📊 Changes

2 files changed (+163 additions, -59 deletions)

View changed files

📝 crates/horizon-client/src/mod_content.rs (+105 -59)
📝 crates/horizon-client/src/mod_content_tests.rs (+58 -0)

📄 Description

🤖 Opened by Aria's agent swarm, Dyna, not by Aria.

Fixes #5379.

A content block with declared state properties expands its template states in facts.json and NBT tables, but its model definitions still had the template state count. Resource loading then fell back to vanilla. Reuse the existing state-combination order for model schema and states, and expand the per-state render ID list in that same order. Landing and survival definitions are per block and stay unchanged.

In-game proof

Before the merge from main, at 4efd95d, on arch, the original byte-identical #5306 content fixture loaded on the integrated server thread. I placed both states, saved, quit and reopened the world. Client block inspection reported both properties after reload. A second run used a copy with a gold model for lit=false and a diamond model for lit=true, so both states are visible:

Gold unlit and diamond lit blocks after reloading the world

after reload: (0, 120, 3) proof:test[lit=true]
after reload: (1, 120, 3) proof:test[lit=false]

The new regression test fails on main because the model schema omits lit; it passes on this branch. https://github.com/arismoko/horizon-machine-sample is the recommended end-to-end route for native mods. It was not used: this is a content-mod resource-loading fix.

Checks

pr_ready (tools/pr_ready.py --base 256a52eb2 on arch, against 256a52eb2 at 256a52eb2, 3 min 54 s)

Check Result
Scope ✅ 2 files, +165 −61
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 508 passed (42 s)
rustfmt ✅ (9 s)
clippy ✅ (1 min 42 s)
tests: horizon-client ✅ 1543 passed (1 min 19 s)
doc tests ✅ 0 passed (2 s)
content root tests ✅ 14 passed
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Dyna.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/5422 **Author:** [@arismoko](https://github.com/arismoko) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `content-state-fanout` --- ### 📝 Commits (2) - [`4efd95d`](https://github.com/horizon-rust/horizon/commit/4efd95dddd9a7e0de8630b14e5cae0b0396b1969) Expand content block model state definitions - [`7fbe0ef`](https://github.com/horizon-rust/horizon/commit/7fbe0efd0087e48440edc2757ad663d98aee9bcc) Merge remote-tracking branch 'upstream/main' into content-state-fanout ### 📊 Changes **2 files changed** (+163 additions, -59 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mod_content.rs` (+105 -59) 📝 `crates/horizon-client/src/mod_content_tests.rs` (+58 -0) </details> ### 📄 Description > 🤖 Opened by Aria's agent swarm, Dyna, not by Aria. Fixes #5379. A content block with declared state properties expands its template states in `facts.json` and NBT tables, but its model definitions still had the template state count. Resource loading then fell back to vanilla. Reuse the existing state-combination order for model schema and states, and expand the per-state render ID list in that same order. Landing and survival definitions are per block and stay unchanged. ## In-game proof Before the merge from main, at `4efd95d`, on arch, the original byte-identical #5306 content fixture loaded on the integrated server thread. I placed both states, saved, quit and reopened the world. Client block inspection reported both properties after reload. A second run used a copy with a gold model for `lit=false` and a diamond model for `lit=true`, so both states are visible: ![Gold unlit and diamond lit blocks after reloading the world](https://raw.githubusercontent.com/arismoko/horizon/4b099a7e46b3c0befc74125188d2618f5395079a/proof-state-reload.png) ```text after reload: (0, 120, 3) proof:test[lit=true] after reload: (1, 120, 3) proof:test[lit=false] ``` The new regression test fails on main because the model schema omits `lit`; it passes on this branch. https://github.com/arismoko/horizon-machine-sample is the recommended end-to-end route for native mods. It was not used: this is a content-mod resource-loading fix. ## Checks **pr_ready** (`tools/pr_ready.py --base 256a52eb2` on arch, against 256a52eb2 at 256a52eb2, 3 min 54 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +165 −61 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 508 passed (42 s) | | rustfmt | ✅ (9 s) | | clippy | ✅ (1 min 42 s) | | tests: horizon-client | ✅ 1543 passed (1 min 19 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ✅ 14 passed | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with Dyna. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:17:36 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6278
No description provided.