From 172e0ce0793206a3cd7ae04f70beadf2e3f66c7e Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 24 Feb 2025 03:59:57 +0000 Subject: [PATCH] add fallback for adding LocalEntity so tests don't fail --- azalea-client/src/plugins/packet/config/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/azalea-client/src/plugins/packet/config/mod.rs b/azalea-client/src/plugins/packet/config/mod.rs index 2e0ce354..1665997c 100644 --- a/azalea-client/src/plugins/packet/config/mod.rs +++ b/azalea-client/src/plugins/packet/config/mod.rs @@ -1,5 +1,6 @@ mod events; +use azalea_entity::LocalEntity; use azalea_protocol::packets::ConnectionProtocol; use azalea_protocol::packets::config::*; use bevy_ecs::prelude::*; @@ -108,7 +109,12 @@ impl ConfigPacketHandler<'_> { commands .entity(self.player) .remove::() - .insert(crate::JoinedClientBundle::default()); + .insert(( + crate::JoinedClientBundle::default(), + // localentity should already be added, but in case the user forgot or + // something we also add it here + LocalEntity, + )); }, ); }