valence_protocol/packets/play/
player_interact_entity_c2s.rs

1use valence_math::Vec3;
2
3use crate::{Decode, Encode, Hand, Packet, VarInt};
4
5#[derive(Copy, Clone, Debug, Encode, Decode, Packet)]
6pub struct PlayerInteractEntityC2s {
7    pub entity_id: VarInt,
8    pub interact: EntityInteraction,
9    pub sneaking: bool,
10}
11
12#[derive(Copy, Clone, PartialEq, Debug, Encode, Decode)]
13pub enum EntityInteraction {
14    Interact(Hand),
15    Attack,
16    InteractAt { target: Vec3, hand: Hand },
17}