Expand description
§mca-parser
A library for parsing Minecraft’s Region files
§Usage
This library should be pretty simple to use,
// Create a Region from an open file
let mut file = File::open("r.0.0.mca")?;
let region = Region::from_reader(&mut file)?;
// `chunk` is raw chunk data, so we need to parse it
let chunk = region.get_chunk(0, 0)?;
if let Some(chunk) = chunk {
    // Parse the raw chunk data into structured NBT format
    let parsed = chunk.parse()?;
    println!("{:?}", parsed.status);
} else {
    // If the chunk is None, it has not been generated
    println!("Chunk has not been generated.");
}Re-exports§
Modules§
- data
 - Module which holds much of the data related structs that are not nbt
 - error
 - Module which contains information about potential errors that may occur while using this crate
 - nbt
 - This module contains all structs related to the nbt data in the chunks
 
Macros§
- positive_
mod  - Mod into positive, i.e. -1 % 16 == 15
 
Structs§
- Dimension
 - Represents a Dimension in a Minecraft world
 - Region
 - Represents a region file, with methods to access data within it.
 - Region
File  - Represents a file which holds a Region
 
Enums§
- DimensionID
 - An enum which represents Minecraft’s IDs for a dimension
 - Region
Ref  - A wrapper around 
Regionthat allows either a reference to be used or a Box over return types. 
Traits§
- Region
Parser  - A trait which represents something that can be parsed into a region and optionally contains information about which region in the world it is.
 
Functions§
- parse_
directory  - Create an iterator over the contents of a directory, allowing each region within to be parsed