From 4a1fdf01217b27d48741bb13dea4f0b5b57d42ca Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 6 May 2025 22:35:17 -0630 Subject: fix incorrect chat parsing when legacy color codes are mixed in --- azalea-chat/src/component.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'azalea-chat/src') 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) } -- cgit v1.2.3