Skip to content

Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.

A respawned player's equipment is heard again from empty

Federico Tagliani234145482626
diff --git a/crates/horizon-client/src/game/lan_actions.rs b/crates/horizon-client/src/game/lan_actions.rs
index 652b3c37a..0482d859d 100644
--- a/crates/horizon-client/src/game/lan_actions.rs
+++ b/crates/horizon-client/src/game/lan_actions.rs
@@ -3164,6 +3164,11 @@ impl Game<'_> {
// count) falls instead of staying up for a player who is gone.
self.guest_container_closed(host, conn);
host.hub.close_container(conn);
+ // PlayerList.respawn builds a new `ServerPlayer`, whose `lastEquipmentItems` starts
+ // empty: the mods hear each worn item again from empty (`native_players_equipment`).
+ if let Some(play) = host.play.get_mut(&conn) {
+ play.equipment_heard = None;
+ }
// PlayerList.respawn: a server's player comes back in its respawn
// point's level: the Overworld, where the world spawn and beds are,
// or another one's anchor or forced point, which its block resolves