This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Minecraft Map Reader/Writer

Project Description

Simple Python 3 editor for Minecraft maps (the item) in NBT format. Allows editing the map image with the Python Image Library or by editing bytes in the color native format.


import minecraftmap
filepath = "/Users/spookymushroom/AppData/Roaming/.minecraft/saves/Test World/data/map_0.dat"

# The False eco value indicates that __init__ should run genimage to update im (the PIL image)
m = minecraftmap.Map(filepath,eco=False)

# The '8' byte in Minecraft's color format is equivalent to (174, 164, 115)

# The allcolorsinversemap dictionary will return the byte value of a color
# when any native Minecraft map color is passed into it
print(m.allcolorsinversemap[(174, 164, 115)])

if m.getbyte(6747) != 8:

# Equivalent to getbyte(6747) for a 128x128 map
if m.getpoint((91,52)) != 8:

# Updates (PIL) to match Map.file (NBT)

# PIL methods, m.font defaults to Andrew Tyler's Minecraftia

# Save (The PIL.Image object) to a file
m.saveimagepng("map_0.png") #front-end for
m.saveimagejpg("map_0.jpg") #front-end for

# method"map_0_customqual.jpg","JPEG",quality=80)

# Updates Map.file (NBT data) to match (PIL image)
# Versions before 0.2 require that the image contains only native colors

# Saves Map.file to an NBT file
# If filename argument is left blank, it saves data to
# the original file as identified by m.file.filename
Requires:Thomas Woolford’s NBT library
Requires:Python Image Library (Pillow)
Includes:Andrew Tyler’s Minecraftia font
Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (20.1 kB) Copy SHA256 Checksum SHA256 Source Dec 15, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting