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},
|
movement::{KnockbackEvent, KnockbackType},
|
||||||
packet::as_system,
|
packet::as_system,
|
||||||
|
raw_connection::RawConnection,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn process_packet_events(ecs: &mut World) {
|
pub fn process_packet_events(ecs: &mut World) {
|
||||||
|
@ -1505,11 +1506,9 @@ impl GamePacketHandler<'_> {
|
||||||
pub fn start_configuration(&mut self, _p: &ClientboundStartConfiguration) {
|
pub fn start_configuration(&mut self, _p: &ClientboundStartConfiguration) {
|
||||||
debug!("Got start configuration packet");
|
debug!("Got start configuration packet");
|
||||||
|
|
||||||
as_system::<(Commands, EventWriter<_>)>(self.ecs, |(mut commands, mut events)| {
|
as_system::<(Query<&RawConnection>, Commands)>(self.ecs, |(query, mut commands)| {
|
||||||
events.send(SendPacketEvent::new(
|
let raw_conn = query.get(self.player).unwrap();
|
||||||
self.player,
|
let _ = raw_conn.write_packet(ServerboundConfigurationAcknowledged);
|
||||||
ServerboundConfigurationAcknowledged,
|
|
||||||
));
|
|
||||||
|
|
||||||
commands
|
commands
|
||||||
.entity(self.player)
|
.entity(self.player)
|
||||||
|
|
Loading…
Add table
Reference in a new issue