Skip to main content

azalea_protocol/packets/game/
c_login.rs

1use azalea_buf::AzBuf;
2use azalea_core::{entity_id::MinecraftEntityId, identifier::Identifier};
3use azalea_protocol_macros::ClientboundGamePacket;
4
5use crate::packets::common::CommonPlayerSpawnInfo;
6
7/// The first packet sent by the server to the client after login.
8///
9/// This packet contains information about the state of the player, the
10/// world, and the registry.
11#[derive(AzBuf, ClientboundGamePacket, Clone, Debug, PartialEq)]
12pub struct ClientboundLogin {
13    pub entity_id: MinecraftEntityId,
14    pub hardcore: bool,
15    pub levels: Vec<Identifier>,
16    #[var]
17    pub max_players: i32,
18    #[var]
19    pub chunk_radius: u32,
20    #[var]
21    pub simulation_distance: u32,
22    pub reduced_debug_info: bool,
23    pub show_death_screen: bool,
24    pub do_limited_crafting: bool,
25    pub common: CommonPlayerSpawnInfo,
26    pub online_mode: bool,
27    pub enforces_secure_chat: bool,
28}