16 releases (10 breaking)

new 0.11.0+mc1.21.4 Dec 21, 2024
0.10.3+mc1.21.1 Oct 23, 2024
0.10.2 Jun 14, 2024
0.9.0 Dec 5, 2023
0.4.0 Nov 19, 2022

#864 in Parser implementations

Download history 12/week @ 2024-08-30 8/week @ 2024-09-06 21/week @ 2024-09-13 47/week @ 2024-09-20 35/week @ 2024-09-27 16/week @ 2024-10-04 14/week @ 2024-10-11 187/week @ 2024-10-18 40/week @ 2024-10-25 44/week @ 2024-11-01 13/week @ 2024-11-08 27/week @ 2024-11-15 49/week @ 2024-11-22 43/week @ 2024-11-29 49/week @ 2024-12-06 35/week @ 2024-12-13

185 downloads per month
Used in 7 crates (6 directly)

MIT license

300KB
5K SLoC

Azalea Chat

Things for working with Minecraft formatted text components.

Examples

// convert a Minecraft formatted text JSON into colored text that can be printed to the terminal.

use azalea_chat::FormattedText;
use serde_json::Value;
use serde::Deserialize;

let j: Value = serde_json::from_str(
    r#"{"text": "hello","color": "red","bold": true}"#
)
.unwrap();
let text = FormattedText::deserialize(&j).unwrap();
assert_eq!(
    text.to_ansi(),
    "\u{1b}[1m\u{1b}[38;2;255;85;85mhello\u{1b}[m"
);

Dependencies

~1–2.2MB
~44K SLoC