aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-12-23 02:01:09 +0000
committermat <git@matdoes.dev>2024-12-23 02:01:09 +0000
commit63fef9d94fbdafdf6beec408b733915dce2c0be7 (patch)
tree65e2d29b45482934cf5bc8e3cccaee1b173a1e00
parenta477a84c6ef4b20929cbdffa697686fcbc20225e (diff)
downloadazalea-drasl-63fef9d94fbdafdf6beec408b733915dce2c0be7.tar.xz
fix 'extra' parsing in FormattedText::from_nbt_compound which results in duplicated chat fragments
-rwxr-xr-xazalea-chat/src/component.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs
index 86738b26..4f772e36 100755
--- a/azalea-chat/src/component.rs
+++ b/azalea-chat/src/component.rs
@@ -434,9 +434,7 @@ impl FormattedText {
return None;
}
if let Some(extra) = compound.get("extra") {
- for c in FormattedText::from_nbt_tag(extra)? {
- component.append(c);
- }
+ component.append(FormattedText::from_nbt_tag(extra)?);
}
let style = Style::from_compound(compound).ok()?;