aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-01-29 02:00:44 +0000
committermat <git@matdoes.dev>2025-01-29 02:02:39 +0000
commitef25e77e5262c68c682d889bc58e7120c66f978a (patch)
tree1810cbbd0440b22ee7cabfd9fffb8454a3cc848b /azalea-protocol/src/packets
parent67c053638cd4f0922f47ae24036c9b868db96e51 (diff)
downloadazalea-drasl-ef25e77e5262c68c682d889bc58e7120c66f978a.tar.xz
add data for EntityEffect particle to fix set_entity_data errors on hypixel
Diffstat (limited to 'azalea-protocol/src/packets')
-rwxr-xr-xazalea-protocol/src/packets/game/c_set_entity_data.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/c_set_entity_data.rs b/azalea-protocol/src/packets/game/c_set_entity_data.rs
index da6536fe..769c2edf 100755
--- a/azalea-protocol/src/packets/game/c_set_entity_data.rs
+++ b/azalea-protocol/src/packets/game/c_set_entity_data.rs
@@ -8,3 +8,26 @@ pub struct ClientboundSetEntityData {
pub id: u32,
pub packed_items: EntityMetadataItems,
}
+
+#[cfg(test)]
+mod tests {
+ use std::io::Cursor;
+
+ use azalea_buf::AzaleaRead;
+
+ use super::*;
+
+ #[test]
+ fn test_read_write_container_set_content() {
+ let contents = [161, 226, 1, 10, 18, 1, 20, 38, 124, 175, 198, 255];
+ let mut buf = Cursor::new(contents.as_slice());
+ let packet = ClientboundSetEntityData::azalea_read(&mut buf).unwrap();
+ println!("{:?}", packet);
+
+ assert_eq!(buf.position(), contents.len() as u64);
+
+ let mut buf = Vec::new();
+ packet.write(&mut buf).unwrap();
+ assert_eq!(buf, contents);
+ }
+}