azalea_protocol/packets/game/
s_player_command.rs1use azalea_buf::AzBuf;
2use azalea_protocol_macros::ServerboundGamePacket;
3use azalea_world::MinecraftEntityId;
4
5#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
6pub struct ServerboundPlayerCommand {
7 #[var]
8 pub id: MinecraftEntityId,
9 pub action: Action,
10 #[var]
11 pub data: u32,
12}
13
14#[derive(AzBuf, Clone, Copy, Debug)]
15pub enum Action {
16 PressShiftKey = 0,
17 ReleaseShiftKey = 1,
18 StopSleeping = 2,
19 StartSprinting = 3,
20 StopSprinting = 4,
21 StartRidingJump = 5,
22 StopRidingJump = 6,
23 OpenInventory = 7,
24 StartFallFlying = 8,
25}