aboutsummaryrefslogtreecommitdiff
path: root/azalea-chat
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-05-06 22:35:17 -0630
committermat <git@matdoes.dev>2025-05-06 22:35:17 -0630
commit4a1fdf01217b27d48741bb13dea4f0b5b57d42ca (patch)
treee8f969b2bd722b7d692d4f31d678fe005209cfe7 /azalea-chat
parentaa0256da102103eedc9897458dd81516962a80a3 (diff)
downloadazalea-drasl-4a1fdf01217b27d48741bb13dea4f0b5b57d42ca.tar.xz
fix incorrect chat parsing when legacy color codes are mixed in
Diffstat (limited to 'azalea-chat')
-rw-r--r--azalea-chat/src/component.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs
index ed7a0648..8eaaf178 100644
--- a/azalea-chat/src/component.rs
+++ b/azalea-chat/src/component.rs
@@ -529,8 +529,9 @@ impl FormattedText {
component.append(FormattedText::from_nbt_tag(extra)?);
}
- let style = Style::from_compound(compound).ok()?;
- component.get_base_mut().style = style;
+ 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);
Some(component)
}