Skip to content

Commit

Permalink
Add separate configuration and game packet events
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayBox committed Jul 20, 2024
1 parent 18232e1 commit 7d869cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions azalea-client/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ pub enum Event {
/// # }
/// # }
/// ```
ConfigurationPacket(ClientboundConfigurationPacket),
GamePacket(ClientboundGamePacket),
Packet(ClientboundPacket),
/// A player joined the game (or more specifically, was added to the tab
/// list).
Expand Down Expand Up @@ -192,6 +194,9 @@ fn configuration_packet_listener(
event.packet.clone(),
)))
.unwrap();
local_player_events
.send(Event::ConfigurationPacket(event.packet.clone()))
.unwrap();
}
}

Expand All @@ -206,6 +211,9 @@ fn game_packet_listener(
local_player_events
.send(Event::Packet(ClientboundPacket::Game(event.packet.clone())))
.unwrap();
local_player_events
.send(Event::GamePacket(event.packet.clone()))
.unwrap();
}
}

Expand Down

0 comments on commit 7d869cb

Please sign in to comment.