[PR #4785] [MERGED] Fix recipe book crafting on servers #5848

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4785
Author: @WooCaash
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/4549-recipe-book-servers


📝 Commits (4)

📊 Changes

1 file changed (+5 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_crafting.rs (+5 -6)

📄 Description

🤖 Opened by WooCaash's AI agent (Cursor Composer), not by WooCaash personally.

Summary

  • On a remote client, craftable recipe-book clicks predict handlePlacement locally while PlaceRecipe is in flight, so the grid updates instead of staying empty until the server answers.
  • Ghost recipes look up the last placed display id (with a recipe-id fallback), and RecipeUi::clear_ghost drops the faded overlay when ContainerSetContent / ContainerSetSlot update the open menu — without touching the private ghost field from remote.rs.

Fixes #4549

Test plan

  • Join a server (or server-thread SP), open the inventory/crafting-table recipe book with ingredients for a craftable recipe, click it: items appear in the grid (not stuck as a red ghost) and the result can be taken.
  • Click an uncraftable recipe: ghost slots still show; picking up ingredients and placing again clears the ghost when the server syncs slots.
  • Shaped recipes such as a minecart at a crafting table place into the correct slots.
  • cargo check -p horizon-client --bin horizon-client

🤖 Generated with Cursor

Made with Cursor


🔄 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/4785 **Author:** [@WooCaash](https://github.com/WooCaash) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/4549-recipe-book-servers` --- ### 📝 Commits (4) - [`646b213`](https://github.com/horizon-rust/horizon/commit/646b213087877e5150a44bf724d8fb05a225bce8) Fix recipe book crafting on servers. - [`0c65113`](https://github.com/horizon-rust/horizon/commit/0c651136a532692f0060613d9ac2fc7fc7078553) Fix server-side recipe book placement - [`f25edbe`](https://github.com/horizon-rust/horizon/commit/f25edbe119738f834f0d065169056a3dd43145e1) Merge main into #4785 - [`f71747f`](https://github.com/horizon-rust/horizon/commit/f71747f7ccbda236c37f258e5bcad19d74bf1e8f) Merge main into #4785 (main's hub.rs clippy fix) ### 📊 Changes **1 file changed** (+5 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_crafting.rs` (+5 -6) </details> ### 📄 Description > 🤖 Opened by WooCaash's AI agent (Cursor Composer), not by WooCaash personally. ## Summary - On a remote client, craftable recipe-book clicks predict `handlePlacement` locally while `PlaceRecipe` is in flight, so the grid updates instead of staying empty until the server answers. - Ghost recipes look up the last placed display id (with a recipe-id fallback), and `RecipeUi::clear_ghost` drops the faded overlay when `ContainerSetContent` / `ContainerSetSlot` update the open menu — without touching the private `ghost` field from `remote.rs`. Fixes #4549 ## Test plan - [ ] Join a server (or server-thread SP), open the inventory/crafting-table recipe book with ingredients for a craftable recipe, click it: items appear in the grid (not stuck as a red ghost) and the result can be taken. - [ ] Click an uncraftable recipe: ghost slots still show; picking up ingredients and placing again clears the ghost when the server syncs slots. - [ ] Shaped recipes such as a minecart at a crafting table place into the correct slots. - [ ] `cargo check -p horizon-client --bin horizon-client` 🤖 Generated with [Cursor](https://cursor.com) Made with [Cursor](https://cursor.com) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:15:24 +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#5848
No description provided.