Skip to main content

steel_protocol/packets/common/
s_client_information.rs

1use steel_macros::{ReadFrom, ServerPacket};
2pub use steel_registry::entity_data::HumanoidArm;
3
4#[derive(ReadFrom, Clone, Debug)]
5pub enum ChatVisibility {
6    Full = 0,
7    System = 1,
8    Hidden = 2,
9}
10
11#[derive(ReadFrom, Clone, Debug)]
12pub enum ParticleStatus {
13    All = 0,
14    Depraced = 1,
15    Minimal = 2,
16}
17
18#[derive(ReadFrom, ServerPacket, Clone, Debug)]
19pub struct SClientInformation {
20    #[read(as = Prefixed(VarInt), bound = 16)]
21    pub language: String,
22    #[read(as = VarInt)]
23    pub view_distance: i32,
24    pub chat_visibility: ChatVisibility,
25    pub chat_colors: bool,
26    #[read(as = VarInt)]
27    pub model_customization: i32,
28    pub main_hand: HumanoidArm,
29    pub text_filtering_enabled: bool,
30    pub allows_listing: bool,
31    pub particle_status: ParticleStatus,
32}