azalea_protocol/packets/game/
s_player_action.rs1use azalea_buf::AzBuf;
2use azalea_core::{direction::Direction, position::BlockPos};
3use azalea_protocol_macros::ServerboundGamePacket;
4
5#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)]
6pub struct ServerboundPlayerAction {
7 pub action: Action,
8 pub pos: BlockPos,
9 pub direction: Direction,
10 #[var]
11 pub seq: u32,
12}
13
14#[derive(AzBuf, Clone, Copy, Debug)]
15pub enum Action {
16 StartDestroyBlock = 0,
17 AbortDestroyBlock = 1,
18 StopDestroyBlock = 2,
19 DropAllItems = 3,
20 DropItem = 4,
21 ReleaseUseItem = 5,
22 SwapItemWithOffhand = 6,
23}