Skip to main content

steel_protocol/packets/login/
c_login_finished.rs

1use steel_macros::{ClientPacket, WriteTo};
2use steel_registry::GameProfile;
3use steel_registry::packets::login::C_LOGIN_FINISHED;
4use uuid::Uuid;
5
6#[derive(ClientPacket, WriteTo, Clone, Debug)]
7#[packet_id(Login = C_LOGIN_FINISHED)]
8pub struct CLoginFinished<'a> {
9    pub game_profile: &'a GameProfile,
10    pub session_id: Uuid,
11}
12
13impl<'a> CLoginFinished<'a> {
14    #[must_use]
15    pub const fn new(game_profile: &'a GameProfile, session_id: Uuid) -> Self {
16        Self {
17            game_profile,
18            session_id,
19        }
20    }
21}