[GH-ISSUE #5379] Content mods: a block with state_properties makes resources fall back to vanilla (model-states not expanded) #1654

Closed
opened 2026-11-02 15:48:41 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @arismoko on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5379

Originally assigned to: @arismoko on GitHub.

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

On main since #5306 (merged at 79ce64782), a content block that declares state_properties makes resource loading fall back to vanilla, so the block does not exist in game.

How to reproduce: a content mod with this block:

{"template":"minecraft:stone","item":false,"state_properties":{"lit":{"type":"boolean"}}}

The mod also ships assets/proof/blockstates/test.json as {"variants":{"":{"model":"proof:block/test"}}}. Start a world on the server thread. The log says:

Horizon: resource packs failed to load (model state definitions disagree with the imported block registry); using the default resources

Then /setblock 0 70 3 proof:test[lit=true] says "Unknown block type 'proof:test'".

Cause: in the generated content root, proof:test has 2 states (lit=false, lit=true) in facts.json and occlusion.nbt, but 1 state with an empty schema in model-states.json. #5306's follow-up 79ce64782 expanded the state tables and the NBT tables per combination. model-states.json still goes through names() in crates/horizon-client/src/mod_content.rs, which copies the template's schema and state list unchanged (we raised this in the review of #5306). landing-definitions.json, survival-rules.json and render-definitions.json take the same path and may need the same expansion.

The same mod without state_properties loads, places the block and survives a reload. We will open a fix. Testing used a content-mod fixture. https://github.com/arismoko/horizon-machine-sample is the recommended end-to-end route for native mods; it was not needed here.

Part of #4953.

/setblock with the custom property on main: Unknown block type

Originally created by @arismoko on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5379 Originally assigned to: @arismoko on GitHub. > 🤖 Filed by Aria's agent swarm, Dyna, not by Aria. On main since #5306 (merged at 79ce64782), a content block that declares `state_properties` makes resource loading fall back to vanilla, so the block does not exist in game. **How to reproduce:** a content mod with this block: ```json {"template":"minecraft:stone","item":false,"state_properties":{"lit":{"type":"boolean"}}} ``` The mod also ships `assets/proof/blockstates/test.json` as `{"variants":{"":{"model":"proof:block/test"}}}`. Start a world on the server thread. The log says: > Horizon: resource packs failed to load (model state definitions disagree with the imported block registry); using the default resources Then `/setblock 0 70 3 proof:test[lit=true]` says "Unknown block type 'proof:test'". **Cause:** in the generated content root, `proof:test` has 2 states (`lit=false`, `lit=true`) in `facts.json` and `occlusion.nbt`, but 1 state with an empty schema in `model-states.json`. #5306's follow-up 79ce64782 expanded the state tables and the NBT tables per combination. `model-states.json` still goes through `names()` in `crates/horizon-client/src/mod_content.rs`, which copies the template's schema and state list unchanged (we raised this in the review of #5306). `landing-definitions.json`, `survival-rules.json` and `render-definitions.json` take the same path and may need the same expansion. The same mod without `state_properties` loads, places the block and survives a reload. We will open a fix. Testing used a content-mod fixture. https://github.com/arismoko/horizon-machine-sample is the recommended end-to-end route for native mods; it was not needed here. Part of #4953. ![/setblock with the custom property on main: Unknown block type](https://raw.githubusercontent.com/arismoko/horizon/724e4afe25f027ea0507671b940f896010bba67b/issue-state-properties-merged.png)
Author
Owner

@arismoko commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6547456542 --> @arismoko commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
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#1654
No description provided.