[PR #533] [MERGED] horizon-port-pack carry: a jar's data and assets as a content mod #2628

Closed
opened 2026-11-02 15:57:45 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/533
Author: @ludovic111
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @ludovic111

Base: main ← Head: feat/port-pack-carry


📝 Commits (3)

  • 746c888 horizon-mods: content mods (API 0.2), blocks and items declared from vanilla templates
  • 8585861 horizon-port-pack: import a modpack and classify its mods
  • 673ac84 horizon-port-pack carry: a jar's data and assets as a content mod

📊 Changes

18 files changed (+2513 additions, -39 deletions)

View changed files

📝 Cargo.lock (+14 -0)
📝 Cargo.toml (+1 -1)
📝 crates/horizon-mods/Cargo.toml (+1 -0)
➕ crates/horizon-mods/src/content.rs (+557 -0)
📝 crates/horizon-mods/src/lib.rs (+2 -0)
📝 crates/horizon-mods/src/manifest.rs (+80 -30)
📝 crates/horizon-mods/src/runtime.rs (+15 -7)
📝 crates/horizon-mods/tests/sandbox.rs (+33 -1)
➕ crates/horizon-port-pack/Cargo.toml (+21 -0)
➕ crates/horizon-port-pack/src/carry.rs (+440 -0)
➕ crates/horizon-port-pack/src/classify.rs (+233 -0)
➕ crates/horizon-port-pack/src/import.rs (+335 -0)
➕ crates/horizon-port-pack/src/inventory.rs (+225 -0)
➕ crates/horizon-port-pack/src/jar.rs (+245 -0)
➕ crates/horizon-port-pack/src/main.rs (+152 -0)
➕ crates/horizon-port-pack/src/modrinth.rs (+113 -0)
📝 docs/modpacks.md (+24 -0)
📝 docs/mods.md (+22 -0)

📄 Description

Stacked on #532 (import and inventory). Step 4 of docs/modpacks.md: the carry-over of data and assets.

What it does

horizon-port-pack carry <work> [<mod id>...] turns each content mod that has a jar into a folder content mod (API 0.2) in <work>/mods/<id>/carry/, for local use. The game loads it with --dev-mod once the content-mod PRs are in.

  • Copied: assets/<id>/, data/<id>/ and data/minecraft/tags/. Other namespaces (such as c tags) and other vanilla data go to outside/ for review. No class file is copied.
  • Recipes: vanilla-type recipes get 26.3 ingredients ("id", "#tag", lists of ids). Custom recipe types and NeoForge conditions are kept as they are and listed.
  • Items: item models get the items/<name>.json client definitions that 1.21.4 introduced. Items without a block are declared from minecraft:stick.
  • Blocks: each block is declared from a vanilla template guessed from its blockstate properties: none gives stone; axis a log; facing, half, hinge, open, powered a door; and so on, 18 sets in all. Blocks with an unknown property set are listed. The oracle's exported facts are meant to replace these guesses (design, step 4.3).
  • Manifest: horizon-mod.toml records the jar and its licence in a comment.
  • Report: carry-report.json lists everything above.

Proof

carried_jar_is_a_content_mod builds a small NeoForge jar with:

  • a full block, a door and a block with unknown properties;
  • two item models;
  • a vanilla recipe and a custom recipe;
  • a loot table, a vanilla tag, a c tag and a class file.

It carries the jar over and checks the report. It then reads the result with horizon-mods' own Content::read from #523: two blocks and one item are declared, and the files are within the fence.

No real jar was downloaded for this work (metadata only). Running it on a real pack's jars is the next step.

Checks

  • cargo fmt --all --check passes, and cargo clippy --workspace --all-targets -- -D warnings passes.
  • cargo test -p horizon-port-pack passes (11 tests).
  • Local parity: results will follow in a comment.

🤖 Generated with 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/533 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/port-pack-carry` --- ### 📝 Commits (3) - [`746c888`](https://github.com/horizon-rust/horizon/commit/746c888cd3b85bfe27dbc15b292f0c62054300f6) horizon-mods: content mods (API 0.2), blocks and items declared from vanilla templates - [`8585861`](https://github.com/horizon-rust/horizon/commit/85858610bfbbd91141fec78b960334d178d0f656) horizon-port-pack: import a modpack and classify its mods - [`673ac84`](https://github.com/horizon-rust/horizon/commit/673ac847243b44b515b7effdfe93bc730bfd97c4) horizon-port-pack carry: a jar's data and assets as a content mod ### 📊 Changes **18 files changed** (+2513 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+14 -0) 📝 `Cargo.toml` (+1 -1) 📝 `crates/horizon-mods/Cargo.toml` (+1 -0) ➕ `crates/horizon-mods/src/content.rs` (+557 -0) 📝 `crates/horizon-mods/src/lib.rs` (+2 -0) 📝 `crates/horizon-mods/src/manifest.rs` (+80 -30) 📝 `crates/horizon-mods/src/runtime.rs` (+15 -7) 📝 `crates/horizon-mods/tests/sandbox.rs` (+33 -1) ➕ `crates/horizon-port-pack/Cargo.toml` (+21 -0) ➕ `crates/horizon-port-pack/src/carry.rs` (+440 -0) ➕ `crates/horizon-port-pack/src/classify.rs` (+233 -0) ➕ `crates/horizon-port-pack/src/import.rs` (+335 -0) ➕ `crates/horizon-port-pack/src/inventory.rs` (+225 -0) ➕ `crates/horizon-port-pack/src/jar.rs` (+245 -0) ➕ `crates/horizon-port-pack/src/main.rs` (+152 -0) ➕ `crates/horizon-port-pack/src/modrinth.rs` (+113 -0) 📝 `docs/modpacks.md` (+24 -0) 📝 `docs/mods.md` (+22 -0) </details> ### 📄 Description Stacked on #532 (import and inventory). Step 4 of [docs/modpacks.md](../blob/main/docs/modpacks.md): the carry-over of data and assets. ## What it does `horizon-port-pack carry <work> [<mod id>...]` turns each content mod that has a jar into a folder content mod (API 0.2) in `<work>/mods/<id>/carry/`, for local use. The game loads it with `--dev-mod` once the content-mod PRs are in. - **Copied:** `assets/<id>/`, `data/<id>/` and `data/minecraft/tags/`. Other namespaces (such as `c` tags) and other vanilla data go to `outside/` for review. No class file is copied. - **Recipes:** vanilla-type recipes get 26.3 ingredients (`"id"`, `"#tag"`, lists of ids). Custom recipe types and NeoForge conditions are kept as they are and listed. - **Items:** item models get the `items/<name>.json` client definitions that 1.21.4 introduced. Items without a block are declared from `minecraft:stick`. - **Blocks:** each block is declared from a vanilla template guessed from its blockstate properties: none gives stone; `axis` a log; `facing, half, hinge, open, powered` a door; and so on, 18 sets in all. Blocks with an unknown property set are listed. The oracle's exported facts are meant to replace these guesses (design, step 4.3). - **Manifest:** `horizon-mod.toml` records the jar and its licence in a comment. - **Report:** `carry-report.json` lists everything above. ## Proof `carried_jar_is_a_content_mod` builds a small NeoForge jar with: - a full block, a door and a block with unknown properties; - two item models; - a vanilla recipe and a custom recipe; - a loot table, a vanilla tag, a `c` tag and a class file. It carries the jar over and checks the report. It then reads the result with horizon-mods' own `Content::read` from #523: two blocks and one item are declared, and the files are within the fence. No real jar was downloaded for this work (metadata only). Running it on a real pack's jars is the next step. ## Checks - `cargo fmt --all --check` passes, and `cargo clippy --workspace --all-targets -- -D warnings` passes. - `cargo test -p horizon-port-pack` passes (11 tests). - Local parity: results will follow in a comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57:45 +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#2628
No description provided.