[PR #6591] [MERGED] Fusion packs: read the fusion section of texture .mcmeta files #6969

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/6591
Author: @some-du6e
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: optifine/fusion-textures


📝 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

8 files changed (+1259 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 (+63 -0)
➕ crates/horizon-optifine/src/fusion/layout.rs (+399 -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 texture says what it is in a fusion section of its .mcmeta: connecting (with layout, connections, sub_texture and per_tile_animation), random, continuous, scrolling, or just base. Every type also takes emissive, render_type and tinting. Horizon needs to read these sections to know which textures are tile sheets and how to light, sort and tint them. Third PR of the Fusion stack; depends on #6588 and #6590 (their commits are included here).

What I did. fusion::Meta::from_mcmeta reads the section next to vanilla's animation. Without a fusion key it returns None, so every vanilla .mcmeta reads as before. Field names, values, defaults and ranges are the wiki's: layout full and connections is_same_state by default; random rows/columns 1-100 with randomness_source defaulting to position_facing; continuous 1-32; scrolling from top_left to bottom_left with a 16 x 16 frame, frame_time 10 and loop wrap. Values outside those ranges are errors, so the loader can warn about the file and skip it, instead of drawing something wrong.

Players see no change yet. Next: connecting models, then the mesher seam.

Docs used. Fusion is All Rights Reserved (its Modrinth license), so I read none of its code. I worked from its public GitHub wiki: Texture Types, and the Base, Connecting, Random, Continuous and Scrolling Texture Type pages. The official Fusion Emissive Ores pack writes its overlays' sections without a type (only emissive and render_type), so a missing type means base. None of the pack's 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/6591 **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-textures` --- ### 📝 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 **8 files changed** (+1259 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` (+63 -0) ➕ `crates/horizon-optifine/src/fusion/layout.rs` (+399 -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 texture says what it is in a `fusion` section of its `.mcmeta`: `connecting` (with `layout`, `connections`, `sub_texture` and `per_tile_animation`), `random`, `continuous`, `scrolling`, or just `base`. Every type also takes `emissive`, `render_type` and `tinting`. Horizon needs to read these sections to know which textures are tile sheets and how to light, sort and tint them. Third PR of the Fusion stack; depends on #6588 and #6590 (their commits are included here). **What I did.** `fusion::Meta::from_mcmeta` reads the section next to vanilla's `animation`. Without a `fusion` key it returns `None`, so every vanilla `.mcmeta` reads as before. Field names, values, defaults and ranges are the wiki's: layout `full` and connections `is_same_state` by default; random `rows`/`columns` 1-100 with `randomness_source` defaulting to `position_facing`; continuous 1-32; scrolling from `top_left` to `bottom_left` with a 16 x 16 frame, `frame_time` 10 and loop `wrap`. Values outside those ranges are errors, so the loader can warn about the file and skip it, instead of drawing something wrong. Players see no change yet. Next: connecting models, then the mesher seam. **Docs used.** Fusion is All Rights Reserved (its Modrinth license), so I read none of its code. I worked from its public GitHub wiki: Texture Types, and the Base, Connecting, Random, Continuous and Scrolling Texture Type pages. The official Fusion Emissive Ores pack writes its overlays' sections without a `type` (only `emissive` and `render_type`), so a missing `type` means `base`. None of the pack's 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#6969
No description provided.