#minecraft #chunk

linearify

Fast region file format manipulation

7 releases

0.1.6 Jun 11, 2023
0.1.5 Jun 9, 2023

#38 in #chunk

41 downloads per month

GPL-3.0 license

27KB
152 lines

Logo

Quickstart

Here is an example using FastNBT to print a whole chunk.

use fastnbt::Value;
use linearify::{self, Region};

fn main() {
    let mut region = linearify::open_linear("./r.0.0.linear").unwrap();
    let buf = region.chunks[0].clone().unwrap().raw_chunk;
    let val: Value = fastnbt::from_bytes(buf.as_slice()).unwrap();
    println!("{:?}", val);
}

Dependencies

~3.5MB
~62K SLoC