1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

add fallback for adding LocalEntity so tests don't fail

This commit is contained in:
mat 2025-02-24 03:59:57 +00:00
parent b9767424f3
commit 172e0ce079

View file

@ -1,5 +1,6 @@
mod events; mod events;
use azalea_entity::LocalEntity;
use azalea_protocol::packets::ConnectionProtocol; use azalea_protocol::packets::ConnectionProtocol;
use azalea_protocol::packets::config::*; use azalea_protocol::packets::config::*;
use bevy_ecs::prelude::*; use bevy_ecs::prelude::*;
@ -108,7 +109,12 @@ impl ConfigPacketHandler<'_> {
commands commands
.entity(self.player) .entity(self.player)
.remove::<InConfigState>() .remove::<InConfigState>()
.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,
));
}, },
); );
} }