-
Notifications
You must be signed in to change notification settings - Fork 1
/
Packet.h
81 lines (79 loc) · 1.92 KB
/
Packet.h
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
69
70
71
72
73
74
75
76
77
78
79
80
81
#pragma once
#include "4dm.h"
namespace fdm
{
namespace Packet
{
enum ClientPacket : short
{
C_LOGIN_DETAILS = 0x0,
C_SKIN_DATA = 0x1,
C_JOIN = 0x2,
C_REJOIN = 0x3,
C_CHAT_MESSAGE = 0x4,
C_BLOCK_BREAK_START = 0x5,
C_BLOCK_BREAK_CANCEL = 0x6,
C_BLOCK_BREAK_FINISH = 0x7,
C_MOVEMENT_UPDATE = 0x8,
C_RENDER_DIST = 0x9,
C_CHUNK_REQUEST = 0xA,
C_ENTITY_REQUEST = 0xB,
C_PLAYER_SKIN_REQUEST = 0xC,
C_HOTBAR_SLOT_SELECT = 0xD,
C_INVENTORY_ACTION = 0xE,
C_INVENTORY_OPEN = 0xF,
C_ITEM_COLLECT = 0x10,
C_ITEM_THROW_HOTBAR = 0x11,
C_ITEM_THROW_CURSOR = 0x12,
C_ITEM_ACTION = 0x13,
C_ITEM_ACTION_ENTITY = 0x14,
C_HITTING_START = 0x15,
C_HITTING_STOP = 0x16,
C_ACTION_START = 0x17,
C_ACTION_STOP = 0x18,
C_CROUCH_START = 0x19,
C_CROUCH_STOP = 0x1A,
C_JUMP = 0x1B,
C_LOOK = 0x1C
};
enum ServerPacket : short
{
S_ERROR_VERSION_INVALID = 0x0,
S_ERROR_UUID_INVALID = 0x1,
S_ERROR_UUID_ALREADY_LOGGED_IN = 0x2,
S_LOGIN_SUCCESS = 0x3,
S_DEATH = 0x4,
S_CHAT_MESSAGE_SERVER = 0x5,
S_CHAT_MESSAGE_PLAYER = 0x6,
S_CHUNK_DATA = 0x7,
S_ENTITY_DATA = 0x8,
S_ENTITY_KILL = 0x9,
S_ENTITY_UPDATE = 0xA,
S_ENTITY_ACTION = 0xB,
S_ENTITY_TRANSFER = 0xC,
S_BLOCK_UPDATE = 0xD,
S_RENDER_DIST = 0xE,
S_HOTBAR_SLOT_SELECT = 0xF,
S_INVENTORY_ACTION = 0x10,
S_INVENTORY_UPDATE = 0x11,
S_ITEM_ACTION = 0x12,
S_ITEM_ACTION_ENTITY = 0x13,
S_ITEM_COLLECT = 0x14,
S_ITEM_THROW_HOTBAR = 0x15,
S_ITEM_THROW_CURSOR = 0x16,
S_PLAYER_SKIN_DATA = 0x17,
S_PLAYER_MOVEMENT_UPDATE = 0x18,
S_PLAYER_EQUIP = 0x19,
S_PLAYER_BLOCK_BREAK_START = 0x1A,
S_PLAYER_BLOCK_BREAK_STOP = 0x1B,
S_PLAYER_HITTING_START = 0x1C,
S_PLAYER_HITTING_STOP = 0x1D,
S_PLAYER_ACTION_START = 0x1E,
S_PLAYER_ACTION_STOP = 0x1F,
S_PLAYER_CROUCH_START = 0x20,
S_PLAYER_CROUCH_STOP = 0x21,
S_PLAYER_JUMP = 0x22,
S_PLAYER_LOOK = 0x23
};
}
}