17 releases (11 breaking)
Uses new Rust 2024
new 0.12.0+mc1.21.5 | Apr 13, 2025 |
---|---|
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.4.0 | Nov 19, 2022 |
#518 in Games
95 downloads per month
Used in 9 crates
(7 directly)
305KB
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.3–2.6MB
~49K SLoC