Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kdkasad/nbt

Command-line parser for Minecraft's NBT data format
https://github.com/kdkasad/nbt

minecraft nbt nbt-parser

Last synced: about 1 month ago
JSON representation

Command-line parser for Minecraft's NBT data format

Awesome Lists containing this project

README

        

# nbt
A command-line NBT (Named Binary Tag) parser

## Description

This project is a command-line parser for Minecraft's [NBT
format](https://minecraft.fandom.com/wiki/NBT_format). It converts the binary
save data generated by Minecraft into human-readable text, called SNBT
(Stringified NBT).

The parser is written in C99-compliant C with no external dependencies.

## Building

Simply run `make` to build the program. The resulting binary will be called
`nbt`.

### Optimization

A build profile can be specified using the `BUILD` environment variable. The
available options are listed below. The value defaults to `release` if none is
specified.

| Value | Settings applied |
| --- | --- |
| `release` | Code is optimized for binary size and all symbols are stripped. |
| `debug` | Code is not optimized and debugging symbols are added. |

The `BUILD` variable can be set as an environment variable or as an argument to `make`:

```sh
$ export BUILD=release
$ make
...

# or

$ make BUILD=release
...
```

## Usage

Run `nbt -h` to print usage information for the program.

Minecraft saves its data in gzip-compressed NBT files. This program doesn't
decompress this data, so you must do that beforehand. You can use the following
pipeline on UNIX-like systems.

```sh
# Template
$ gzip -dc | nbt [options]

# Example
$ gzip -dc level.dat | nbt
```