Skip to content

Commit

Permalink
implement StartConfiguration packet maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-1 committed Dec 7, 2023
1 parent cbbb9b1 commit 26bd9be
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion azalea-client/src/packet_handling/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(_) => {}
Expand Down Expand Up @@ -1404,7 +1422,6 @@ pub fn process_packet_events(ecs: &mut World) {
ClientboundGamePacket::DamageEvent(_) => {}
ClientboundGamePacket::HurtAnimation(_) => {}

ClientboundGamePacket::StartConfiguration(_) => {}
ClientboundGamePacket::TickingState(_) => {}
ClientboundGamePacket::TickingStep(_) => {}

Expand Down

0 comments on commit 26bd9be

Please sign in to comment.