mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
use RawConnection to write reply after getting start_configuration
This commit is contained in:
parent
713b312167
commit
f8140e4188
1 changed files with 4 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue