Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcnbt

A zero-dependency Minecraft NBT .dat file viewer for Java 8+.

Prints a tagged tree to stdout or pipes it to a text file.

Usage

# print to console
java -jar mcnbt.jar -i player.dat

# pipe to file
java -jar mcnbt.jar -i level.dat -o output.txt

# long form
java -jar mcnbt.jar --input world/level.dat --output level_tree.txt

Example output

TAG_Compound('Data'): 42 entries
├── TAG_Int('DataVersion'): 3953
├── TAG_String('LevelName'): My World
├── TAG_Compound('Player'): 18 entries
│   ├── TAG_List('Pos') of TAG_Double: 3 items
│   │   ├── TAG_Double: 128.5
│   │   ├── TAG_Double: 64.0
│   │   └── TAG_Double: -37.2
│   ├── TAG_Int('Score'): 0
│   └── TAG_Byte('OnGround'): 1
└── TAG_Long('LastPlayed'): 1715000000000

Building

Requires Maven 3.x and JDK 8+.

mvn package
# output: target/mcnbt.jar

Features

  • Auto-detects GZip compression (standard for most Minecraft .dat files)
  • Supports all 13 NBT tag types (Java Edition 1.0 through 1.21+)
  • Unicode-aware output (UTF-8)
  • Tree lines, array inline previews for arrays ≤ 16 elements
  • GitHub Actions CI — fat JAR built on every push; GitHub Release on v* tags

Supported files

Any Java Edition NBT file:

  • level.dat, level.dat_old
  • Player files (<uuid>.dat)
  • servers.dat
  • hotbar.nbt, options.txt (NBT variant)
  • Region chunk data (after decompression)

Flags

Flag Long Description
-i --input Input .dat file (required)
-o --output Output text file (stdout if omitted)
-h --help Show help
-v --version Show version

About

JAR tool to read the tree of .dat files optionally piping to a file

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages