A command-line NBT (Named Binary Tag) parser
This project is a command-line parser for Minecraft's 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.
Simply run make
to build the program. The resulting binary will be called
nbt
.
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
:
$ export BUILD=release
$ make
...
# or
$ make BUILD=release
...
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.
# Template
$ gzip -dc <compressed NBT file> | nbt [options]
# Example
$ gzip -dc level.dat | nbt