chunkedge_protocol/packets/play/
interact_c2s.rs

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