From bbc57aa838c52a7120722a0bf4ea2df2f644c473 Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Sun, 25 Oct 2026 21:59:37 +0100 Subject: [PATCH] Save furnace, brewing stand and crafter edits made through a server menu A server player's clicks in a furnace, brewing stand or crafter menu wrote the block entity's slots but never marked it changed, so the chunk was not saved: an idle furnace (nothing burning, so its own tick changes nothing) given or emptied through its menu rolled back on reopen or chunk unload, losing or duplicating the items. Comparators kept the old reading too. When the click changed the container's slots, call container_changed (BlockEntity.setChanged, reached through Slot.setChanged in vanilla's AbstractContainerMenu.doClick and quickMoveStack), as chest-like menus already do. --- crates/horizon-client/src/game/lan_crafting.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/horizon-client/src/game/lan_crafting.rs b/crates/horizon-client/src/game/lan_crafting.rs index f74935522..d3c4b1825 100644 --- a/crates/horizon-client/src/game/lan_crafting.rs +++ b/crates/horizon-client/src/game/lan_crafting.rs @@ -291,6 +291,11 @@ impl Game<'_> { let at = host.hub.guests[gi].position; self.award_furnace_recipes(pos, at); } + // Slot.setChanged on a changed container slot: BlockEntity.setChanged, + // so the chunk is saved and comparators read the block again. + if (0..items.len()).any(|k| menu.slot(k) != items[k].as_ref()) { + self.container_changed(pos); + } host.play.entry(conn).or_default().crafting.machine = Some((p.container, menu)); host.hub.inventory_clicked(conn, p, &self.world, &changed); true