[PR #3384] [MERGED] сlean up station recipes #4946

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3384
Author: @SolomonNumb1
Created: 10/28/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: fix/smithing-ingredients


📝 Commits (1)

📊 Changes

2 files changed (+16 additions, -29 deletions)

View changed files

📝 crates/horizon-client/src/crafting.rs (+1 -9)
📝 crates/horizon-client/src/stations.rs (+15 -20)

📄 Description

What and why

Station recipes with object ingredients ({"item": "..."} / {"tag": "..."}) parsed into empty ingredients and broke smithing. Switched stations.rs to Ingredient::parse and added support for object arrays

fixes point 1 of #3305

Vanilla reference

 vanilla net.minecraft.world.item.crafting.Ingredient (Ingredient.CODEC / Ingredient.fromJson, supporting item/tag objects and arrays of them) and net.minecraft.world.item.crafting.SmithingTransformRecipe$Serializer. Harness: stations::tests::smithing_ingredient_parses_objects and crafting::tests::ingredient_parses_objects_and_arrays_of_objects

Self-check

pr_ready (tools/pr_ready.py on SolomonPCs, against origin/main at a1e56a4d1)

Check Result
Scope ✅ 2 files, +128 −25
Cargo.lock ✅ unchanged
Public tree ✅ (0 s)
Python tests ✅ pass
rustfmt ✅ (16 s)
clippy ✅ (10 s)
tests: horizon-client ✅ pass (2 s)
doc tests ➖ unchanged
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Screenshots

изображение

mini mod for example


🔄 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/3384 **Author:** [@SolomonNumb1](https://github.com/SolomonNumb1) **Created:** 10/28/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/smithing-ingredients` --- ### 📝 Commits (1) - [`0dcc9a1`](https://github.com/horizon-rust/horizon/commit/0dcc9a15fdc2850bf669e9b3564a9ac535aec289) smithing cleanup ### 📊 Changes **2 files changed** (+16 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/crafting.rs` (+1 -9) 📝 `crates/horizon-client/src/stations.rs` (+15 -20) </details> ### 📄 Description ## What and why <!-- What this changes, and why. Link the issue it fixes ("Fixes #123"). --> Station recipes with object ingredients (`{"item": "..."}` / `{"tag": "..."}`) parsed into empty ingredients and broke smithing. Switched `stations.rs` to `Ingredient::parse` and added support for object arrays fixes point 1 of #3305 ## Vanilla reference <!-- The vanilla classes and methods this follows (tools/rea_vanilla.py), and the harness that checks it. "Horizon-only" for a feature vanilla doesn't have; "none" for tooling or docs. --> vanilla net.minecraft.world.item.crafting.Ingredient (Ingredient.CODEC / Ingredient.fromJson, supporting item/tag objects and arrays of them) and net.minecraft.world.item.crafting.SmithingTransformRecipe$Serializer. Harness: stations::tests::smithing_ingredient_parses_objects and crafting::tests::ingredient_parses_objects_and_arrays_of_objects ## Self-check <!-- Paste the block `python3 tools/pr_ready.py` prints (`--base upstream/main` from a fork). --> **pr_ready** (`tools/pr_ready.py` on SolomonPCs, against origin/main at a1e56a4d1) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +128 −25 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (0 s) | | Python tests | ✅ pass | | rustfmt | ✅ (16 s) | | clippy | ✅ (10 s) | | tests: horizon-client | ✅ pass (2 s) | | doc tests | ➖ unchanged | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (no vanilla data here): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) ## Screenshots <!-- For anything players see: before and after. Delete this section otherwise. --> <img width="738" height="359" alt="изображение" src="https://github.com/user-attachments/assets/f27a108f-b2c8-448a-af8f-6f7e26ff0b0c" /> <small>mini mod for example</small> <!-- Please tick "Allow edits by maintainers": we push small fixups ourselves instead of a round trip. See CONTRIBUTING.md. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:09:06 +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#4946
No description provided.