azalea/azalea-chat
mat 7857a014b9
1.20.3 (#110)
* 23w40a

* 23w41a

* 23w42a

* 23w43a

* 23w44a

* serialize FormattedText as nbt in network

* use azalea-nbt/serde in azalea-chat

* 23w45a

* fix 23w45a to compile

* handle Object in codegen

* 1.20.3-pre2

* remove unused clientbound_resource_pack_packet.rs

* merge main and make azalea-chat use simdnbt

* 1.20.3-rc1

* fix tests

* use simdnbt 0.3

* fix ServerboundSetJigsawBlockPacket

* 1.20.3
2023-12-05 10:59:05 -06:00
..
src 1.20.3 (#110) 2023-12-05 10:59:05 -06:00
tests Use an ECS (#52) 2023-02-04 19:32:27 -06:00
Cargo.toml 1.20.3 (#110) 2023-12-05 10:59:05 -06:00
README.md Use an ECS (#52) 2023-02-04 19:32:27 -06:00

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"
);