LAN: a trading screen a guest opens releases the chest it replaces
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user