diff options
| author | mat <git@matdoes.dev> | 2023-12-07 15:54:37 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-12-07 15:54:37 -0600 |
| commit | 26bd9be55f898404137dbf2caa9dcc0b32f140a8 (patch) | |
| tree | 6b9fa17c9dce6570f21b3d887285228368f9c296 | |
| parent | cbbb9b123e073da9cc2c717a8ada58b61f22914a (diff) | |
| download | azalea-drasl-26bd9be55f898404137dbf2caa9dcc0b32f140a8.tar.xz | |
implement StartConfiguration packet maybe
| -rw-r--r-- | azalea-client/src/packet_handling/game.rs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index afa0f4c0..3edcc5cf 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -20,6 +20,7 @@ use azalea_protocol::{ packets::game::{ clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket, serverbound_accept_teleportation_packet::ServerboundAcceptTeleportationPacket, + serverbound_configuration_acknowledged_packet::ServerboundConfigurationAcknowledgedPacket, serverbound_keep_alive_packet::ServerboundKeepAlivePacket, serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket, serverbound_pong_packet::ServerboundPongPacket, ClientboundGamePacket, @@ -1377,6 +1378,23 @@ pub fn process_packet_events(ecs: &mut World) { system_state.apply(ecs); } + ClientboundGamePacket::StartConfiguration(_) => { + let mut system_state: SystemState<(Commands, EventWriter<SendPacketEvent>)> = + SystemState::new(ecs); + let (mut commands, mut packet_events) = system_state.get_mut(ecs); + + packet_events.send(SendPacketEvent { + entity: player_entity, + packet: ServerboundConfigurationAcknowledgedPacket {}.get(), + }); + + // add InConfigurationState + commands + .entity(player_entity) + .insert(crate::client::InConfigurationState) + .remove::<crate::JoinedClientBundle>(); + } + ClientboundGamePacket::SelectAdvancementsTab(_) => {} ClientboundGamePacket::SetActionBarText(_) => {} ClientboundGamePacket::SetBorderCenter(_) => {} @@ -1404,7 +1422,6 @@ pub fn process_packet_events(ecs: &mut World) { ClientboundGamePacket::DamageEvent(_) => {} ClientboundGamePacket::HurtAnimation(_) => {} - ClientboundGamePacket::StartConfiguration(_) => {} ClientboundGamePacket::TickingState(_) => {} ClientboundGamePacket::TickingStep(_) => {} |
