aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/client.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-02-22 22:34:06 +0000
committermat <git@matdoes.dev>2025-02-22 22:34:06 +0000
commit6fdf5fce497543d75b2c5a1f97bc35945bcfe74f (patch)
tree73765f9457a8fcb9f208ee067ff2a911e3bea15a /azalea-client/src/client.rs
parent444993b609d54124183fbcadee121c11897ee20e (diff)
downloadazalea-drasl-6fdf5fce497543d75b2c5a1f97bc35945bcfe74f.tar.xz
fix brand and client info so they're only sent when leaving login instead of entering config
closes #206
Diffstat (limited to 'azalea-client/src/client.rs')
-rw-r--r--azalea-client/src/client.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 131aef16..9de97cc1 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -76,7 +76,7 @@ use crate::{
mining::{self, MinePlugin},
movement::{LastSentLookDirection, PhysicsState, PlayerMovePlugin},
packet_handling::{
- login::{self, LoginSendPacketQueue},
+ login::{self, InLoginState, LoginSendPacketQueue},
PacketHandlerPlugin,
},
player::retroactively_add_game_profile_component,
@@ -371,6 +371,7 @@ impl Client {
ecs_lock.lock().entity_mut(entity).insert((
LoginSendPacketQueue { tx: ecs_packets_tx },
login::IgnoreQueryIds::default(),
+ InLoginState,
));
// login
@@ -457,6 +458,7 @@ impl Client {
p.game_profile
);
conn.write(ServerboundLoginAcknowledged {}).await?;
+
break (conn.config(), p.game_profile);
}
ClientboundLoginPacket::LoginDisconnect(p) => {
@@ -485,7 +487,8 @@ impl Client {
.lock()
.entity_mut(entity)
.remove::<login::IgnoreQueryIds>()
- .remove::<LoginSendPacketQueue>();
+ .remove::<LoginSendPacketQueue>()
+ .remove::<InLoginState>();
Ok((conn, profile))
}