[PR #6592] [MERGED] Fusion packs: connecting models and their connections #6970

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6592
Author: @some-du6e
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: optifine/fusion-models


📝 Commits (10+)

  • 4fbeab0 Fusion packs: which tiles of a connecting texture a face draws
  • daa63d0 Fusion layouts: pin more template tiles, and one rule for rows and columns
  • 9cc9df1 Fusion layouts: credit the FusionExamples templates, and say where each layout comes from
  • 1a54e1c Fusion layouts: overlay corners join two sides into one piece
  • 2fb130b Fusion layouts: say which overlay test pins a guess
  • 442ac7a Fusion layouts: clippy's identity_op in a test
  • d7896df Fusion packs: connection predicates
  • e440012 Fusion predicates: test every direction name and state values
  • 574d9b1 Fusion predicates: name the field a bad block list came from
  • 383eea6 Fusion predicates: clippy's identity_op in a test

📊 Changes

9 files changed (+1504 additions, -4 deletions)

View changed files

📝 THIRD_PARTY_NOTICES.md (+24 -0)
📝 crates/horizon-optifine/Cargo.toml (+1 -1)
📝 crates/horizon-optifine/src/ctm/connect.rs (+1 -1)
➕ crates/horizon-optifine/src/fusion.rs (+64 -0)
➕ crates/horizon-optifine/src/fusion/layout.rs (+399 -0)
➕ crates/horizon-optifine/src/fusion/model.rs (+244 -0)
➕ crates/horizon-optifine/src/fusion/predicate.rs (+349 -0)
➕ crates/horizon-optifine/src/fusion/texture.rs (+417 -0)
📝 crates/horizon-optifine/src/lib.rs (+5 -2)

📄 Description

A Fusion pack turns connected textures on through its block models: "loader": "fusion:model" with "type": "connecting" (or fusion:connecting). Such a model's connections either gives one set of predicates for every face, or names sets by key, the way textures names textures. Each face then picks its set by its connections reference, else by its texture one, with default as the fallback. Last parsing PR of the Fusion stack; depends on #6588, #6590 and #6591 (their commits are included here).

What I did. fusion::model::ModelType::of reads the loader and type. Connections parses the connections value: a predicate object or an array means every face; an object of keys means named sets, with #key references followed (a reference loop resolves to nothing). for_face answers a face's predicates, or None when the texture's own apply. inherit merges a child model's keys over its parent's, the way textures inherit. The wiki doesn't describe parents, but the official connected-glass pack parents every pane model on templates that carry no connections.

Players see no change yet. Next in the stack: the mesher seam. The game resolves the predicates to state ids at load, slices each tile sheet into sprites, and draws the faces through connected.rs's Pick (one tile, or quarters for pieced) and its Overlay path (the overlay layout).

Docs used. Fusion is All Rights Reserved (its Modrinth license), so I read none of its code. I worked from its public GitHub wiki: Model Types, Base Model Type and Connecting Model Type. The official Fusion Connected Glass pack shows models written as "type": "fusion:connecting" and parented on templates without connections. None of its files are committed.

Checks. cargo fmt and cargo test -p horizon-optifine --lib fusion locally (the one quick test the shared machine's rules allow). The workspace clippy and test run is on my fork's CI for the tip of the stack: https://github.com/some-du6e/horizon/actions/runs/41366109977. No .local vanilla data on this machine, so no harnesses, and the review loop's live game test was skipped: nothing here is drawn yet. Reviewed in three rounds of fresh reviewers. Round 1 found a missing type that Fusion Emissive Ores relies on, plus weak test coverage. Round 2 found that overlay corners join two sides into one piece. Round 3 was clean.

Note

Filed by Opus 5.5 using Claude Code.


🔄 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/6592 **Author:** [@some-du6e](https://github.com/some-du6e) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `optifine/fusion-models` --- ### 📝 Commits (10+) - [`4fbeab0`](https://github.com/horizon-rust/horizon/commit/4fbeab00aec9beaae1b3e7d6c342f4e7ae749215) Fusion packs: which tiles of a connecting texture a face draws - [`daa63d0`](https://github.com/horizon-rust/horizon/commit/daa63d0fa7c628a53cba2e3bcfdd151b6e472cb2) Fusion layouts: pin more template tiles, and one rule for rows and columns - [`9cc9df1`](https://github.com/horizon-rust/horizon/commit/9cc9df16b4d99d6c3bbb94e77755be0041c93fd6) Fusion layouts: credit the FusionExamples templates, and say where each layout comes from - [`1a54e1c`](https://github.com/horizon-rust/horizon/commit/1a54e1cc56134c554564eafa848fb37f88348016) Fusion layouts: overlay corners join two sides into one piece - [`2fb130b`](https://github.com/horizon-rust/horizon/commit/2fb130b16cb90424737d0e72e0716e8011101af9) Fusion layouts: say which overlay test pins a guess - [`442ac7a`](https://github.com/horizon-rust/horizon/commit/442ac7ab418663c806f9df196a611c93639e6b1e) Fusion layouts: clippy's identity_op in a test - [`d7896df`](https://github.com/horizon-rust/horizon/commit/d7896df7d8ea9cc25829d348f9b065406deb1623) Fusion packs: connection predicates - [`e440012`](https://github.com/horizon-rust/horizon/commit/e440012293655f43c6d1373c7e4bb94bd71173be) Fusion predicates: test every direction name and state values - [`574d9b1`](https://github.com/horizon-rust/horizon/commit/574d9b148e75278797a74a13b26452816960d04c) Fusion predicates: name the field a bad block list came from - [`383eea6`](https://github.com/horizon-rust/horizon/commit/383eea634de36c12e8884a07aaf61ffe6c539599) Fusion predicates: clippy's identity_op in a test ### 📊 Changes **9 files changed** (+1504 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `THIRD_PARTY_NOTICES.md` (+24 -0) 📝 `crates/horizon-optifine/Cargo.toml` (+1 -1) 📝 `crates/horizon-optifine/src/ctm/connect.rs` (+1 -1) ➕ `crates/horizon-optifine/src/fusion.rs` (+64 -0) ➕ `crates/horizon-optifine/src/fusion/layout.rs` (+399 -0) ➕ `crates/horizon-optifine/src/fusion/model.rs` (+244 -0) ➕ `crates/horizon-optifine/src/fusion/predicate.rs` (+349 -0) ➕ `crates/horizon-optifine/src/fusion/texture.rs` (+417 -0) 📝 `crates/horizon-optifine/src/lib.rs` (+5 -2) </details> ### 📄 Description A Fusion pack turns connected textures on through its block models: `"loader": "fusion:model"` with `"type": "connecting"` (or `fusion:connecting`). Such a model's `connections` either gives one set of predicates for every face, or names sets by key, the way `textures` names textures. Each face then picks its set by its `connections` reference, else by its `texture` one, with `default` as the fallback. Last parsing PR of the Fusion stack; depends on #6588, #6590 and #6591 (their commits are included here). **What I did.** `fusion::model::ModelType::of` reads the loader and type. `Connections` parses the `connections` value: a predicate object or an array means every face; an object of keys means named sets, with `#key` references followed (a reference loop resolves to nothing). `for_face` answers a face's predicates, or `None` when the texture's own apply. `inherit` merges a child model's keys over its parent's, the way textures inherit. The wiki doesn't describe parents, but the official connected-glass pack parents every pane model on templates that carry no `connections`. Players see no change yet. Next in the stack: the mesher seam. The game resolves the predicates to state ids at load, slices each tile sheet into sprites, and draws the faces through `connected.rs`'s `Pick` (one tile, or quarters for `pieced`) and its `Overlay` path (the `overlay` layout). **Docs used.** Fusion is All Rights Reserved (its Modrinth license), so I read none of its code. I worked from its public GitHub wiki: Model Types, Base Model Type and Connecting Model Type. The official Fusion Connected Glass pack shows models written as `"type": "fusion:connecting"` and parented on templates without `connections`. None of its files are committed. **Checks.** `cargo fmt` and `cargo test -p horizon-optifine --lib fusion` locally (the one quick test the shared machine's rules allow). The workspace clippy and test run is on my fork's CI for the tip of the stack: https://github.com/some-du6e/horizon/actions/runs/41366109977. No `.local` vanilla data on this machine, so no harnesses, and the review loop's live game test was skipped: nothing here is drawn yet. Reviewed in three rounds of fresh reviewers. Round 1 found a missing `type` that Fusion Emissive Ores relies on, plus weak test coverage. Round 2 found that `overlay` corners join two sides into one piece. Round 3 was clean. > [!NOTE] > Filed by Opus 5.5 using Claude Code. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:30:26 +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#6970
No description provided.