mcnbt
Read and write NBT files.[^1]
[^1]: Reading not yet supported.
Installation
cargo add mcnbt
Examples
Writing NBT data.
use ;
let tag = Compound;
println!;
Read and write NBT files.[^1]
[^1]: Reading not yet supported.
cargo add mcnbt
Writing NBT data.
use mcnbt::{ByteOrder, Tag};
let tag = Tag::Compound(
Some(""), // Most outer tag is a compound with an empty name
&[
Tag::Int(Some("foo"), 42),
Tag::List(Some("bar"), &[
Tag::String(None, "Hello"),
Tag::String(None, "World"),
]),
Tag::ByteArray(Some("baz"), &[
-8,
-6,
-4,
-2,
0,
2,
4,
6,
8,
]),
],
);
println!("{:#?}", tag.as_bytes(ByteOrder::LittleEndian));