Skip to content
This repository

Minecraft Levels for Python

branch: master
Octocat-spinner-32 regression_test added regression test for heightmap January 06, 2011
Octocat-spinner-32 schematics .NET gzip output doesn't always get read correctly by python's gzip September 28, 2010
Octocat-spinner-32 test Fixed: Off-by-one error in schematic export with extended IDs. February 01, 2013
Octocat-spinner-32 testfiles TileEntity.copyWithOffset now adjusts the coordinates of teleport com… January 08, 2013
Octocat-spinner-32 .gitattributes Add .gitattributes with core.autocrlf October 27, 2012
Octocat-spinner-32 .gitignore Add built docs to gitignore January 26, 2013
Octocat-spinner-32 .travis.yml Add cython to travis install command October 13, 2013
Octocat-spinner-32 LICENSE.txt added licensing terms September 25, 2010
Octocat-spinner-32 README.txt Formally depend on pyyaml instead of pasting it in. This way pyyaml g… February 13, 2012
Octocat-spinner-32 __init__.py Rename java.py -> javalevel.py November 23, 2013
Octocat-spinner-32 _nbt.pyx NBT: TAG_List now accepts item assignment using slices. October 31, 2012
Octocat-spinner-32 biome_types.py Added: New biome types October 26, 2013
Octocat-spinner-32 block_copy.py Added: Biomes are now exported into schematic files. January 11, 2013
Octocat-spinner-32 block_fill.py Fixed: import statement automatically inserted by PyCharm was relativ… January 24, 2013
Octocat-spinner-32 blockrotation.py Added: Block rotation for several new blocks. March 24, 2013
Octocat-spinner-32 box.py Add Vector.intfloor January 10, 2013
Octocat-spinner-32 cachefunc.py pyflakes helped fixes: cachefunc.py: resolve function redefinition March 04, 2012
Octocat-spinner-32 classic.yaml fix stone step graphics, change "Grey" spelling to "Gray" as it is in… October 29, 2011
Octocat-spinner-32 entity.py Revert "Fixed: TileEntity.copyWithOffset adjusts mob position data fo… May 15, 2013
Octocat-spinner-32 faces.py add faces.py September 29, 2011
Octocat-spinner-32 gprof2dot.py pyflakes result fix: local variable is assigned to but never used February 26, 2012
Octocat-spinner-32 indev.py Refactor: Change log statements to use `log.info()` instead of `info=… October 31, 2012
Octocat-spinner-32 indev.yaml Blocktypes: Include classic blocks in indev.yaml instead of loading c… November 03, 2012
Octocat-spinner-32 infiniteworld.py Flush and sync lock file when acquiring session lock October 13, 2013
Octocat-spinner-32 items.py update for Minecraft 1.6.2 August 14, 2013
Octocat-spinner-32 javalevel.py Rename java.py -> javalevel.py November 23, 2013
Octocat-spinner-32 level.py Cleanup: Check whether a point is in the level's bounds using `in sel… November 14, 2012
Octocat-spinner-32 materials.py Debug: Block YAML parsing errors are now fatal. March 04, 2014
Octocat-spinner-32 mce.py mce.py: dumpsigns: Don't decode sign text now that TAG_String automat… March 09, 2013
Octocat-spinner-32 mclevel.py Rename java.py -> javalevel.py November 23, 2013
Octocat-spinner-32 mclevelbase.py Cleanup: Finding directories in mclevelbase.py December 02, 2012
Octocat-spinner-32 minecraft.yaml Syntax Fixes March 09, 2014
Octocat-spinner-32 minecraft_server.py Server Generator: Combine stdout and stderr to be compatible with pos… October 26, 2013
Octocat-spinner-32 nbt.py Fixed: Remove self from TAG_Compound's key not found error message January 10, 2013
Octocat-spinner-32 nbt_util.py Clean up NBT modules. October 10, 2012
Octocat-spinner-32 pocket.py Debug: Change loggers to use __name__ instead of __file__ February 11, 2013
Octocat-spinner-32 pocket.yaml Pocket: Fixed water, sandstone, quartz textures March 10, 2014
Octocat-spinner-32 profimg.sh add profiling scripts July 30, 2011
Octocat-spinner-32 regionfile.py Raise a ChunkTooBig error when trying to save a chunk that exceeds re… October 06, 2013
Octocat-spinner-32 requirements.txt Formally depend on pyyaml instead of pasting it in. This way pyyaml g… February 13, 2012
Octocat-spinner-32 requirements_test.txt Try to get travis-ci going October 13, 2013
Octocat-spinner-32 run_nbt_tests.sh Tests now import pymclevel modules relative to pymclevel. This remove… January 07, 2013
Octocat-spinner-32 run_regression_test.py Tests: run_regression_test.py now uses testfiles/AnvilWorld instead o… December 02, 2012
Octocat-spinner-32 schematic.py Fixed: Schematic entities have wrong positions after rotating. February 15, 2013
Octocat-spinner-32 setup.cfg Added distutils setup script written by user:sixohsix. September 15, 2011
Octocat-spinner-32 setup.py Build: Merge setup_nbt.py into setup.py. October 29, 2012
Octocat-spinner-32 setupnbt64.bat add setup_nbt.py and setupnbt64.bat. try to import _nbt without using… November 29, 2011
README.txt
Python library for reading Minecraft levels.

Can read Alpha levels, Indev levels, and Creative levels (with help).

Includes a command-line client (mce.py)

Requires numpy and PyYaml.

Read mclevel.py to get started.

See LICENSE.txt for licensing terms.



mce.py is a command-line editor for SMP maps. It can be used interactively from a terminal, accept editing commands on standard input, or run a single editing command from the shell.

Sample usage:

$ python mce.py

    Usage:

    Block commands:
        clone <sourcePoint> <sourceSize> <destPoint>
        fill <blockType> [ <point> <size> ]
        replace <blockType> [with] <newBlockType> [ <point> <size> ]

        export <filename> <sourcePoint> <sourceSize>
        import <filename> <destPoint>

        analyze

    Player commands:
        player [ <player> [ <point> ] ]
        spawn [ <point> ]

    Entity commands:
        removeEntities [ <EntityID> ]

    Chunk commands:
        createChunks <point> <size>
        deleteChunks <point> <size>
        prune <point> <size>
        relight [ <point> <size> ]

    World commands:
        degrief

    Editor commands:
        save
        reload
        load <filename> | <world number>
        quit

    Informational:
        blocks [ <block name> | <block ID> ]
        help [ <command> ]

    Points and sizes are space-separated triplets of numbers ordered X Y Z.
    X is position north-south, increasing southward.
    Y is position up-down, increasing upward.
    Z is position east-west, increasing westward.

    A player's name can be used as a point - it will use the
    position of the player's head. Use the keyword 'delta' after
    the name to specify a point near the player.

    Example:
       codewarrior delta 0 5 0

    This refers to a point 5 blocks above codewarrior's head.


Please enter world number or path to world folder: 4
INFO:Identifying C:\Users\Rio\AppData\Roaming\.minecraft\saves\World4\level.dat
INFO:Detected Infdev level.dat
INFO:Saved 0 chunks
INFO:Scanning for chunks...
INFO:Found 6288 chunks.
World4> fill 20 Player delta -10 0 -10 20 20 20

Filling with Glass
Filled 8000 blocks.
World4> player Player

Player Player: [87.658381289724858, 54.620000004768372, 358.64257283335115]
World4> player Player Player delta 0 25 0

Moved player Player to (87.658381289724858, 79.620000004768372, 358.642572833351
15)
World4> save

INFO:Asked to light 6 chunks
INFO:Batch 1/1
INFO:Lighting 20 chunks
INFO:Dispersing light...
INFO:BlockLight Pass 0: 20 chunks
INFO:BlockLight Pass 1: 2 chunks
INFO:BlockLight Pass 2: 0 chunks
INFO:BlockLight Pass 3: 0 chunks
INFO:BlockLight Pass 4: 0 chunks
INFO:BlockLight Pass 5: 0 chunks
INFO:BlockLight Pass 6: 0 chunks
INFO:BlockLight Pass 7: 0 chunks
INFO:BlockLight Pass 8: 0 chunks
INFO:BlockLight Pass 9: 0 chunks
INFO:BlockLight Pass 10: 0 chunks
INFO:BlockLight Pass 11: 0 chunks
INFO:BlockLight Pass 12: 0 chunks
INFO:BlockLight Pass 13: 0 chunks
INFO:SkyLight Pass 0: 20 chunks
INFO:SkyLight Pass 1: 22 chunks
INFO:SkyLight Pass 2: 17 chunks
INFO:SkyLight Pass 3: 9 chunks
INFO:SkyLight Pass 4: 7 chunks
INFO:SkyLight Pass 5: 2 chunks
INFO:SkyLight Pass 6: 0 chunks
INFO:SkyLight Pass 7: 0 chunks
INFO:SkyLight Pass 8: 0 chunks
INFO:SkyLight Pass 9: 0 chunks
INFO:SkyLight Pass 10: 0 chunks
INFO:SkyLight Pass 11: 0 chunks
INFO:SkyLight Pass 12: 0 chunks
INFO:SkyLight Pass 13: 0 chunks
INFO:Completed in 0:00:02.024000, 0:00:00.337333 per chunk
INFO:Saved 20 chunks
World4>
Something went wrong with that request. Please try again.