azalea_protocol/packets/game/
s_player_command.rs

1use 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    StopSleeping,
17    StartSprinting,
18    StopSprinting,
19    StartRidingJump,
20    StopRidingJump,
21    OpenInventory,
22    StartFallFlying,
23}