From 7120842f9d2c659a2f12d8922299c2a761bc5582 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sun, 10 Aug 2025 18:55:23 -0500 Subject: Send correct data component checksums (#234) * start implementing data component crc32 hashes * start doing serde impls for checksums * make more components hashable * make all data components serializable * support recursive components * fix simdnbt dep * update changelog * clippy --- azalea-chat/src/component.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-chat/src/component.rs') diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index 2a7e588e..e1652cf1 100644 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -21,7 +21,7 @@ use crate::{ }; /// A chat component, basically anything you can see in chat. -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Hash)] +#[derive(Clone, Debug, PartialEq, Serialize)] #[serde(untagged)] pub enum FormattedText { Text(TextComponent), @@ -348,7 +348,7 @@ impl<'de> Deserialize<'de> for FormattedText { } let style = Style::deserialize(&json); - component.get_base_mut().style = style; + component.get_base_mut().style = Box::new(style); return Ok(component); } @@ -539,7 +539,7 @@ impl FormattedText { let base_style = Style::from_compound(compound).ok()?; let new_style = &mut component.get_base_mut().style; - *new_style = new_style.merged_with(&base_style); + *new_style = Box::new(new_style.merged_with(&base_style)); Some(component) } -- cgit v1.2.3