aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/c_update_attributes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/game/c_update_attributes.rs')
-rwxr-xr-xazalea-protocol/src/packets/game/c_update_attributes.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/c_update_attributes.rs b/azalea-protocol/src/packets/game/c_update_attributes.rs
new file mode 100755
index 00000000..2b800643
--- /dev/null
+++ b/azalea-protocol/src/packets/game/c_update_attributes.rs
@@ -0,0 +1,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>,
+}