From f8140e418805aff1f6fb35c55a77d61a3a3656af Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 13 Mar 2025 21:19:05 +0000 Subject: [PATCH] use RawConnection to write reply after getting start_configuration --- azalea-client/src/plugins/packet/game/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/azalea-client/src/plugins/packet/game/mod.rs b/azalea-client/src/plugins/packet/game/mod.rs index 4968a699..80249cdc 100644 --- a/azalea-client/src/plugins/packet/game/mod.rs +++ b/azalea-client/src/plugins/packet/game/mod.rs @@ -32,6 +32,7 @@ use crate::{ }, movement::{KnockbackEvent, KnockbackType}, packet::as_system, + raw_connection::RawConnection, }; pub fn process_packet_events(ecs: &mut World) { @@ -1505,11 +1506,9 @@ impl GamePacketHandler<'_> { pub fn start_configuration(&mut self, _p: &ClientboundStartConfiguration) { debug!("Got start configuration packet"); - as_system::<(Commands, EventWriter<_>)>(self.ecs, |(mut commands, mut events)| { - events.send(SendPacketEvent::new( - self.player, - ServerboundConfigurationAcknowledged, - )); + as_system::<(Query<&RawConnection>, Commands)>(self.ecs, |(query, mut commands)| { + let raw_conn = query.get(self.player).unwrap(); + let _ = raw_conn.write_packet(ServerboundConfigurationAcknowledged); commands .entity(self.player)