Minecraft mine analysis – mian

The mian wiki is now up! Updates will be put there for your convenience.

Pepijn de Vos has made a tool to graph materials in Minecraft save games across heights, to see how deep one should mine to find for example diamond. As a propaganda minister Minecraft player with too much time on his hands, this was too cool. I just tweaked it a bit, we both contributed speed improvements, and now it looks like this:

Graph of block count for several materials across the height of the world

On Ubuntu, you can install it with the following command:
sudo apt-get install python-matplotlib && sudo easy_install mian
… and run it like this:
mian ~/.minecraft/saves/World1

Options include:
-b, --blocks – Specify block types to include as a comma-separated list, using either the block types or hex values from the list.
-l, --list – List available block types.
-n, --nether – Show Nether data instead of the normal world.

For example, run mian -b 01,dirt,09,sand ~/.minecraft/saves/World1 to get a map of the more common elements in the map, with the abrupt cutoff of stationary water showing the sea height:

Common materials in Minecraft

More information is available in the form of a Git repository (of course it’s open source) and Ohloh project.

Update: Now works with The Nether, included in today’s Halloween Update. To graph The Nether, make sure you visit it first, update mian with sudo easy_install -U mian, then add the parameter -n to your command. For example mian -b 56,57,58,59,5a,5b -n ~/.minecraft/saves/World1 to show all the new materials:

Graph of the new materials in an existing world

Beta update: mian 0.6 works fine with Minecraft Beta. If you have an older version, simply run sudo easy_install -U mian