[PR #7557] [MERGED] Content mods: tuple-selected block shapes and independent collision #7668

Closed
opened 2026-11-03 07:21:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7557
Author: @Xmilon
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: content/block-shapes


📝 Commits (3)

  • 5d41cf1 feat(mods): support tuple-selected block and collision shapes
  • 2c94acf test(mods): verify collision-only outlines stay unchanged
  • 3abeb4f Merge main into #7557

📊 Changes

4 files changed (+339 additions, -75 deletions)

View changed files

📝 crates/horizon-client/src/mod_content.rs (+100 -61)
📝 crates/horizon-client/src/mod_content_tests.rs (+106 -0)
📝 crates/horizon-mods/src/content.rs (+101 -14)
📝 docs/mods.md (+32 -0)

📄 Description

?? Opened by Xmilon's AI agent (Codex, GPT-6.1 Sol; Claude Code orchestration), not by Xmilon personally.

What and why

Closes #7464

  • Extend content block shapes with ordered properties tuples and an explicit default fallback. Template and block-declared properties can be combined; the existing single-property table remains supported.
  • Add optional collision_shapes using the same format, including a constant empty shape ({"default":[]}). Omitting it retains the existing collision behavior; a collision-only override leaves the outline untouched.
  • Resolve geometry in final state order, including interleaved template/custom properties. Emit the independent collision table and derive full_collision from collision rather than outline.
  • Reject invalid selectors, unknown properties/value tuples, malformed/reversed/nonfinite boxes and excessive box counts through the existing logged content-load error path.
  • Document the keys and add parser plus synthetic resource-table regression coverage. No dependencies, hook changes or generated API edits.

Kind

  • feature: something new for players

Vanilla reference

Horizon-only content data format. Reuses the existing VoxelShape/shape-cache implementation; no new vanilla gameplay algorithm or hook. The issue's distinction between BlockBehaviour.getShape and getCollisionShape is represented by independent declarations.

Other projects' code

None.

Self-check

Passed locally on Windows:

  • cargo fmt --all and cargo fmt --all --check
  • git diff --check
  • cargo check -p horizon-mods -p horizon-client-lib --lib -j 1
  • cargo test -p horizon-mods: 33 passed, 0 failed; doc tests passed (0 tests).
  • python -m unittest tests.test_pr_ready.PrReadyTests.test_content_root_tests_run_only_when_what_they_load_changes
  • python tools/check_public_tree.py

Validation limits (not green claims):

  • Ran the required cold cargo clippy -p horizon-mods -p horizon-client-lib --all-targets -- -D warnings. The initial implementation's unsupported VoxelShape equality was fixed before the checkpoint. On resumption, the requested final Clippy attempt checked the libraries but failed in existing example/integration targets with E0460/E0462 dependency artifact-version/staticlib errors. No successful all-target Clippy result is claimed.
  • cargo test -p horizon-mods -p horizon-client-lib exhausted host memory while compiling horizon-client-lib. Retried client unit tests serially with crate debug info disabled (cargo test -p horizon-client-lib --lib -j 1 --config 'profile.test.package.horizon-client-lib.debug=0'); rustc again failed allocating memory (0xc0000409). Client runtime tests, including the new cases at crates/horizon-client/src/mod_content_tests.rs:2547 and :2614, remain unexecuted. The implementation type-checks at crates/horizon-client/src/mod_content.rs:572 and :1593.
  • The broad python -m unittest tests.test_pr_ready ran 25 tests with three failing subcases in the unrelated test_the_launcher_fallback_asks_for_a_feature_the_launcher_has; the content-root-specific test passes. No unrelated test/tool changes made.
  • Not run in game; no prepared-resource or vanilla parity harness run. No hook/mod_api code changed, so mod-api generation was not applicable. No fragment JSONs changed.

Written by an AI agent (Claude Code orchestrating GPT-6.1 Sol) for Xmilon

?? Generated with Codex (GPT-6.1 Sol; Claude Code orchestration).


🔄 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/7557 **Author:** [@Xmilon](https://github.com/Xmilon) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `content/block-shapes` --- ### 📝 Commits (3) - [`5d41cf1`](https://github.com/horizon-rust/horizon/commit/5d41cf16232896faf5763173da5db0fb2f504b1c) feat(mods): support tuple-selected block and collision shapes - [`2c94acf`](https://github.com/horizon-rust/horizon/commit/2c94acfbe6a2e5d0429998b8f92e6e543ff3a709) test(mods): verify collision-only outlines stay unchanged - [`3abeb4f`](https://github.com/horizon-rust/horizon/commit/3abeb4f8457b443c04764092402f8c6fb61d6d17) Merge main into #7557 ### 📊 Changes **4 files changed** (+339 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mod_content.rs` (+100 -61) 📝 `crates/horizon-client/src/mod_content_tests.rs` (+106 -0) 📝 `crates/horizon-mods/src/content.rs` (+101 -14) 📝 `docs/mods.md` (+32 -0) </details> ### 📄 Description > ?? Opened by Xmilon's AI agent (Codex, GPT-6.1 Sol; Claude Code orchestration), not by Xmilon personally. ## What and why Closes #7464 - Extend content block `shapes` with ordered `properties` tuples and an explicit `default` fallback. Template and block-declared properties can be combined; the existing single-`property` table remains supported. - Add optional `collision_shapes` using the same format, including a constant empty shape (`{"default":[]}`). Omitting it retains the existing collision behavior; a collision-only override leaves the outline untouched. - Resolve geometry in final state order, including interleaved template/custom properties. Emit the independent collision table and derive `full_collision` from collision rather than outline. - Reject invalid selectors, unknown properties/value tuples, malformed/reversed/nonfinite boxes and excessive box counts through the existing logged content-load error path. - Document the keys and add parser plus synthetic resource-table regression coverage. No dependencies, hook changes or generated API edits. ## Kind - [x] feature: something new for players ## Vanilla reference Horizon-only content data format. Reuses the existing VoxelShape/shape-cache implementation; no new vanilla gameplay algorithm or hook. The issue's distinction between BlockBehaviour.getShape and getCollisionShape is represented by independent declarations. ## Other projects' code None. ## Self-check Passed locally on Windows: - `cargo fmt --all` and `cargo fmt --all --check` - `git diff --check` - `cargo check -p horizon-mods -p horizon-client-lib --lib -j 1` - `cargo test -p horizon-mods`: 33 passed, 0 failed; doc tests passed (0 tests). - `python -m unittest tests.test_pr_ready.PrReadyTests.test_content_root_tests_run_only_when_what_they_load_changes` - `python tools/check_public_tree.py` Validation limits (not green claims): - Ran the required cold `cargo clippy -p horizon-mods -p horizon-client-lib --all-targets -- -D warnings`. The initial implementation's unsupported VoxelShape equality was fixed before the checkpoint. On resumption, the requested final Clippy attempt checked the libraries but failed in existing example/integration targets with E0460/E0462 dependency artifact-version/staticlib errors. No successful all-target Clippy result is claimed. - `cargo test -p horizon-mods -p horizon-client-lib` exhausted host memory while compiling horizon-client-lib. Retried client unit tests serially with crate debug info disabled (`cargo test -p horizon-client-lib --lib -j 1 --config 'profile.test.package.horizon-client-lib.debug=0'`); rustc again failed allocating memory (0xc0000409). Client runtime tests, including the new cases at `crates/horizon-client/src/mod_content_tests.rs:2547` and `:2614`, remain unexecuted. The implementation type-checks at `crates/horizon-client/src/mod_content.rs:572` and `:1593`. - The broad `python -m unittest tests.test_pr_ready` ran 25 tests with three failing subcases in the unrelated `test_the_launcher_fallback_asks_for_a_feature_the_launcher_has`; the content-root-specific test passes. No unrelated test/tool changes made. - Not run in game; no prepared-resource or vanilla parity harness run. No hook/mod_api code changed, so mod-api generation was not applicable. No fragment JSONs changed. Written by an AI agent (Claude Code orchestrating GPT-6.1 Sol) for Xmilon ?? Generated with [Codex](https://github.com/openai/codex) (GPT-6.1 Sol; Claude Code orchestration). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:21:44 +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#7668
No description provided.