valence_protocol/packets/play/
game_join_s2c.rs

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