mcnbt

Read and write NBT files.[^1]

Installation

console cargo add mcnbt

Examples

Writing NBT data.

```rust 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()); ```