azalea_protocol/packets/game/
c_update_attributes.rs

1use azalea_buf::AzBuf;
2use azalea_entity::attributes::AttributeModifier;
3use azalea_protocol_macros::ClientboundGamePacket;
4use azalea_registry::Attribute;
5use azalea_world::MinecraftEntityId;
6
7#[derive(Clone, Debug, AzBuf, ClientboundGamePacket)]
8pub struct ClientboundUpdateAttributes {
9    #[var]
10    pub entity_id: MinecraftEntityId,
11    pub values: Vec<AttributeSnapshot>,
12}
13
14#[derive(Clone, Debug, AzBuf)]
15pub struct AttributeSnapshot {
16    pub attribute: Attribute,
17    pub base: f64,
18    pub modifiers: Vec<AttributeModifier>,
19}