aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/c_player_look_at.rs
blob: b623868e7ae8dc373aacd32e63dcdbb52cd8dca0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use azalea_buf::AzBuf;
use azalea_core::position::Vec3;
use azalea_protocol_macros::ClientboundGamePacket;

#[derive(AzBuf, ClientboundGamePacket, Clone, Debug, PartialEq)]
pub struct ClientboundPlayerLookAt {
    pub from_anchor: Anchor,
    pub pos: Vec3,
    pub entity: Option<AtEntity>,
}

#[derive(AzBuf, Clone, Copy, Debug, PartialEq)]
pub enum Anchor {
    Feet = 0,
    Eyes = 1,
}

#[derive(AzBuf, Clone, Debug, PartialEq)]
pub struct AtEntity {
    #[var]
    pub entity: u32,
    pub to_anchor: Anchor,
}