azalea_protocol/packets/game/
s_interact.rs1use azalea_buf::AzBuf;
2use azalea_core::{delta::LpVec3, entity_id::MinecraftEntityId};
3use azalea_protocol_macros::ServerboundGamePacket;
4
5#[derive(AzBuf, Clone, Debug, PartialEq, ServerboundGamePacket)]
6pub struct ServerboundInteract {
7 #[var]
8 pub entity_id: MinecraftEntityId,
9 pub hand: InteractionHand,
10 pub location: LpVec3,
11 pub using_secondary_action: bool,
13}
14
15#[derive(AzBuf, Clone, Copy, Debug, Default, PartialEq)]
16pub enum InteractionHand {
17 #[default]
18 MainHand = 0,
19 OffHand = 1,
20}