1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// TODO
// use minecraft_net_proc::Field;
// use crate::fields::types::{PrefixedArray, PrefixedOptional, VarInt, UUID};
// Field!(Property, {
// name: String,
// value: String,
// signature: PrefixedOptional<String>,
// });
// Field!(AddPlayerAction, {
// name: String,
// properties: PrefixedArray<Property>,
// });
//
// Field!(UserKeyData, {
// public_key_expiry_time: Long,
// encoded_public_key: PrefixedArray<Byte>,
// public_key_signature: PrefixedArray<Byte>,
// });
// Field!(InitializeChatAction, {
// chat_session_id: UUID,
// key_data: PrefixedOptional<UserKeyData>,
// });
//
// pub enum PlayerAction {
// AddPlayer(AddPlayerAction),
// InitializeChat(InitializeChatAction),
// UpdateGameMode(VarInt),
// UpdateListed(bool),
// UpdateLatency(VarInt),
// UpdateDisplayName(PrefixedOptional<String>),
// UpdateListPriority(VarInt),
// UpdateHat(bool),
// }
// impl PlayerAction {
// pub fn to_bytes(&self) -> Vec<u8> {
// match self {
// PlayerAction::AddPlayer(d) => {}
// PlayerAction::InitializeChat(d) => {}
// PlayerAction::UpdateGameMode(d) => {}
// PlayerAction::UpdateListed(d) => {}
// PlayerAction::UpdateLatency(d) => {}
// PlayerAction::UpdateDisplayName(d) => {}
// PlayerAction::UpdateListPriority(d) => {}
// PlayerAction::UpdateHat(d) => {}
// }
// }
// }
//
//
// pub struct Player {
// pub uuid: UUID,
// pub actions: Vec<PlayerAction>
// }
// // use minecraft_net_proc::{Field_old, Packet_old};
// // use crate::fields::types::{PrefixedArray, UUID};
// // TODO
// // #[derive(Clone, Debug, Field_old)]
// // pub struct Player {
// // pub uuid: UUID,
// // // pub player_actions: Vec<PlayerActon> TODO: figure out
// // }
// //
// // #[derive(Debug, Packet_old)]
// // #[id = 0x40]
// // pub struct PlayerInfoUpdate {
// // // actions: EnumSet TODO: figure out
// // players: PrefixedArray<Player>
// // }