3 #[mt_derive(to = "clt")]
11 #[mt_derive(to = "clt", repr = "u8")]
21 #[mt_derive(to = "clt", repr = "u32", enumset)]
28 #[mt_derive(to = "clt", repr = "u64", enumset)]
29 pub enum CsmRestrictionFlag {
38 #[mt_derive(to = "clt", repr = "u8")]
39 pub enum ChatMsgType {
46 #[mt_derive(to = "clt", repr = "u8")]
47 pub enum PlayerListUpdateType {
69 #[mt_derive(to = "clt", repr = "u16", tag = "type", content = "data")]
72 serialize_version: u8,
73 #[mt(const_before = "0u16")] // compression
75 auth_methods: EnumSet<AuthMethod>,
82 sudo_auth_methods: EnumSet<AuthMethod>,
85 #[mt(const_after = "[0u8; 15]")]
86 sudo_auth_methods: EnumSet<AuthMethod>,
89 Kick(KickReason) = 10,
113 CsmRestrictionFlags {
114 flags: EnumSet<CsmRestrictionFlag>,
127 #[mt(const_before = "1u8")]
128 msg_type: ChatMsgType,
133 timestamp: i64, // unix time
160 transition_time: f32,
169 #[mt(len = "(u32, (DefCfg, u32))")]
170 files: HashMap<String, Vec<u8>>, // name -> payload
172 #[mt(size = "u32", zlib)]
173 NodeDefs(#[mt(const_before = "1u8")] NodeDefs) = 58,
175 files: HashMap<String, String>, // name -> base64 sha1 hash
178 #[mt(size = "u32", zlib)]
180 #[mt(const_before = "0u8")] // version
182 aliases: HashMap<String, String>,
191 #[serde(rename = "loop")]
201 privs: HashSet<String>,
237 expiration_time: f32,
244 anim_params: TileAnim,
254 pos: RangeInclusive<[f32; 3]>,
255 vel: RangeInclusive<[f32; 3]>,
256 acc: RangeInclusive<[f32; 3]>,
257 expiration_time: RangeInclusive<f32>,
258 size: RangeInclusive<f32>,
265 attached_obj_id: u16,
266 anim_params: TileAnim,
285 flags: EnumSet<HudFlag>,
286 mask: EnumSet<HudFlag>,
288 HotbarParam(HotbarParam) = 77,
292 SkyParams(SkyParams) = 79,
293 OverrideDayNightRatio {
294 #[serde(rename = "override")]
295 ratio_override: bool,
309 RemoveParticleSpawner {
312 CloudParams(CloudParams) = 84,
319 update_type: PlayerListUpdateType,
320 players: HashSet<String>,
332 #[mt(size = "u32", zlib)]
333 #[mt(len = "NodeMetasLen")]
334 changed: HashMap<[i16; 3], NodeMeta>,
336 SunParams(SunParams) = 90,
337 MoonParams(MoonParams) = 91,
338 StarParams(StarParams) = 92,
346 MinimapModes(MinimapModesPkt) = 98,
349 impl PktInfo for ToCltPkt {
350 fn pkt_info(&self) -> (u8, bool) {
354 BlockData { .. } | Media { .. } => (2, true),
359 | HotbarParam(_) => (1, true),