aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-03-13 21:19:05 +0000
committermat <git@matdoes.dev>2025-03-13 21:21:59 +0000
commitf8140e418805aff1f6fb35c55a77d61a3a3656af (patch)
tree8088ca7bd3b70e625ad47e7425456b3d30491cb1
parent713b3121676fd422a666e30b5f0f25b280b4ecc6 (diff)
downloadazalea-drasl-f8140e418805aff1f6fb35c55a77d61a3a3656af.tar.xz
use RawConnection to write reply after getting start_configuration
-rw-r--r--azalea-client/src/plugins/packet/game/mod.rs9
1 files 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)