A python library to read (and edit) Minecraft Java Edition files. Requires python 3.7.
- Parse
level.dat
(player.dat format). - Parse region file (anvil format) and chunks within the region.
- Parse
raids.dat
file (raids format). - Parse poi file (anvil format).
- Includes examples to quickly perform analysis, listing, etc. (check
cli
folder). - Based on nbtlib library.
- Inspired by twoolie's NBT.
import minenbt
save_folder = minenbt.SaveFolder("SaveInstance")
dat = save_folder.level_dat()
inventory = dat.root["Data"]["Player"]["Inventory"]
- Go to latest release
- Download "
win-amd64.zip
" - Extract the zip file anywhere
- Run
minenbt.exe <SAVE_PATH> <command>
,SAVE_PATH
must be a Minecraft save folder (eg:%appdata%\.minecraft\saves\<Name>
)
info
General information about the world.biome
Count the number of biomes in a dimension.add
Add one item to the single player inventory.containers
Prints all containersmobs
Prints all mobs in the Overworldstructures
Prints all structuresblock
Find blocks by idrepair
Repair all items in the single player's inventory.slime
Find slime chunks
SPATH
is a Minecraft save folder (eg: %appdata%\.minecraft\saves\<Name>
).
minenbt.exe SPATH info
minenbt.exe SPATH add minecraft:shield
minenbt.exe SPATH add minecraft:sand -c 64
This command will set an almost full durability bar for every item in a single player inventory.
minenbt.exe SPATH repair
This command will print all diamond ore with a horizontal distance from the player lesser then 20 (circa).
minenbt.exe SPATH block minecraft:diamond_ore -l 20