Skip to content

Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.

Fusion layouts: credit the FusionExamples templates, and say where each layout comes from

some-du6e9cc9df16b4d9
diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md
index 7da71e2cf..103d85567 100644
--- a/THIRD_PARTY_NOTICES.md
+++ b/THIRD_PARTY_NOTICES.md
@@ -91,3 +91,27 @@ licensed under the MIT license:
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
> DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+## FusionExamples
+
+The tile tables in `crates/horizon-optifine/src/fusion/layout.rs` were read off the connecting
+texture templates (`templates/template <layout>.png`) of
+[FusionExamples](https://github.com/SuperMartijn642/FusionExamples) (at `8c9c56e`), which is
+licensed under the MIT license:
+
+> Copyright (c) 2024 Martijn van den Brand
+>
+> Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+> and associated documentation files (the "Software"), to deal in the Software without
+> restriction, including without limitation the rights to use, copy, modify, merge, publish,
+> distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
+> Software is furnished to do so, subject to the following conditions:
+>
+> The above copyright notice and this permission notice shall be included in all copies or
+> substantial portions of the Software.
+>
+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+> BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+> DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/crates/horizon-optifine/Cargo.toml b/crates/horizon-optifine/Cargo.toml
index 91c71f29b..a4de2b3b9 100644
--- a/crates/horizon-optifine/Cargo.toml
+++ b/crates/horizon-optifine/Cargo.toml
@@ -4,7 +4,7 @@ version = "0.1.0"
edition.workspace = true
license.workspace = true
rust-version.workspace = true
-description = "OptiFine-format resource pack files: .properties, the name, range, biome and block matchers, paths and the optifine/ folders; CEM entity models and connected-texture rules"
+description = "OptiFine-format resource pack files: .properties, the name, range, biome and block matchers, paths and the optifine/ folders; CEM entity models and connected-texture rules, and the Fusion mod's connected-texture format"
[dependencies]
log = "0.4"
diff --git a/crates/horizon-optifine/src/fusion/layout.rs b/crates/horizon-optifine/src/fusion/layout.rs
index 3e629e240..d508fa70d 100644
--- a/crates/horizon-optifine/src/fusion/layout.rs
+++ b/crates/horizon-optifine/src/fusion/layout.rs
@@ -2,8 +2,9 @@
//! for the neighbours that join it (a [`crate::ctm::connect`] mask). Tiles are numbered row by
//! row from the top left of the grid.
//!
-//! The tables are FusionExamples' `templates/template <layout>.png`: each tile marks its joined
-//! sides (and, where both sides beside a corner join, that corner) in green.
+//! The tiles are FusionExamples' `templates/template <layout>.png`: each marks its joined sides
+//! (and, where both sides beside a corner join, that corner) in green. `compact`'s template
+//! names its 5 tiles, not their masks; which one a face takes is the wiki's GIF of the layout.
use crate::ctm::connect::{D, DL, DR, L, R, U, UL, UR, overlay_tiles, reduce};
@@ -15,7 +16,9 @@ pub enum Layout {
Simple,
/// 47 tiles: the sides and the corners.
Full,
+ /// 4 tiles in a column: alone, a column's top, middle and bottom.
Vertical,
+ /// 4 tiles in a row: alone, a row's left end, middle and right end.
Horizontal,
/// 5 tiles, a whole one per face.
Compact,
diff --git a/crates/horizon-optifine/src/lib.rs b/crates/horizon-optifine/src/lib.rs
index 580c3e771..c3084d88a 100644
--- a/crates/horizon-optifine/src/lib.rs
+++ b/crates/horizon-optifine/src/lib.rs
@@ -10,8 +10,8 @@
//!
//! Written from OptiFine's public documentation of the file formats (and ETF's, for its additions
//! to random entities and emissive textures); `cit` also from CIT Resewn's wiki and the conditions of its MIT-licensed
-//! source (THIRD_PARTY_NOTICES.md); `fusion` from Fusion's wiki. No OptiFine or Fusion code was
-//! read.
+//! source (THIRD_PARTY_NOTICES.md); `fusion` from Fusion's wiki and FusionExamples' MIT-licensed
+//! layout templates (THIRD_PARTY_NOTICES.md). No OptiFine or Fusion code was read.
pub mod blink;
pub mod cem;