chunkedge_protocol/packets/play/
login_s2c.rs

1use std::borrow::Cow;
2use std::collections::BTreeSet;
3
4use chunkedge_binary::{Decode, Encode, VarInt};
5use chunkedge_ident::Ident;
6
7use crate::game_mode::OptGameMode;
8use crate::{GameMode, GlobalPos, Packet};
9
10#[derive(Clone, Debug, Encode, Decode, Packet)]
11pub struct LoginS2c<'a> {
12    pub entity_id: i32,
13    pub is_hardcore: bool,
14    pub dimension_names: Cow<'a, BTreeSet<Ident<Cow<'a, str>>>>,
15    pub max_players: VarInt,
16    pub view_distance: VarInt,
17    pub simulation_distance: VarInt,
18    pub reduced_debug_info: bool,
19    pub enable_respawn_screen: bool,
20    pub do_limited_crafting: bool,
21    pub dimension_type: VarInt, // from the dimension type registry
22    pub dimension_name: Ident<Cow<'a, str>>,
23    pub hashed_seed: i64,
24    pub game_mode: GameMode,
25    pub previous_game_mode: OptGameMode,
26    pub is_debug: bool,
27    pub is_flat: bool,
28    pub last_death_location: Option<GlobalPos<'a>>,
29    pub portal_cooldown: VarInt,
30    pub sea_level: VarInt,
31    pub enforeces_secure_chat: bool,
32}