From 8d6b8b3f03d3b5f828da3e7df5402de8d2466fd2 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Thu, 15 Oct 2026 20:33:01 +0200 Subject: [PATCH] LAN: a trading screen a guest opens releases the chest it replaces Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/src/game/lan_trading.rs | 2 ++ crates/horizon-client/src/game/remote.rs | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/horizon-client/src/game/lan_trading.rs b/crates/horizon-client/src/game/lan_trading.rs index 8b033f8b2..d6bfc4141 100644 --- a/crates/horizon-client/src/game/lan_trading.rs +++ b/crates/horizon-client/src/game/lan_trading.rs @@ -55,6 +55,8 @@ impl Game<'_> { state.session.update_special_prices(); } let title = self.merchant_display_name(&state); + // The container the trading screen replaces loses its opener. + self.guest_container_closed(host, conn); let Some(window) = host.hub.open_merchant_window(conn, title) else { self.merchant_closed(&mut state); return; diff --git a/crates/horizon-client/src/game/remote.rs b/crates/horizon-client/src/game/remote.rs index b06a6e30e..0a09ec70b 100644 --- a/crates/horizon-client/src/game/remote.rs +++ b/crates/horizon-client/src/game/remote.rs @@ -837,7 +837,10 @@ impl Game<'_> { let state = self.world.block(p.pos[0], p.pos[1], p.pos[2]); let block = &self.res.facts.get(state).name; let named = self.remote.as_ref().and_then(|r| { - r.builtin.get("minecraft:block")?.name(p.block).map(str::to_owned) + r.builtin + .get("minecraft:block")? + .name(p.block) + .map(str::to_owned) }); if named.as_deref() == Some(&**block) { self.block_entity_event(p.pos, i32::from(p.b0), i32::from(p.b1));