aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/c_update_attributes.rs
blob: 2b800643baf2e0bf53cde1776bc6cff2e8c7f9b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use azalea_buf::AzBuf;
use azalea_entity::attributes::AttributeModifier;
use azalea_protocol_macros::ClientboundGamePacket;
use azalea_registry::Attribute;

#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
pub struct ClientboundUpdateAttributes {
    #[var]
    pub entity_id: u32,
    pub values: Vec<AttributeSnapshot>,
}

#[derive(Clone, Debug, AzBuf)]
pub struct AttributeSnapshot {
    pub attribute: Attribute,
    pub base: f64,
    pub modifiers: Vec<AttributeModifier>,
}