Skip to main content

Minecraft: Python Edition

Minecraft

Minecraft: Python Edition is a project that strives to recreate each and every old Minecraft version in Python 3 using the Pyglet multimedia library and Cython for performance.

The project is currently working on the Indev versions of Minecraft. The latest version is Indev 0.31 20100131 as released on January 31, 2010.

This version adds the main menu, passive human mobs, and item durability to the game.

Features from previous Indev versions include the Indev mossy cobblestone spawn house, NBT level file saving, tools, torches, advanced liquid spread, TNT explosives, chests, workbench crafting, and soup.

To easily install this version of Minecraft: Python Edition, just run python -m pip install minecraft-python==0.31.20100131.

You can learn more about this version on the Minecraft wiki.

Organization

This project's commits represent the Python versions of each Minecraft Java game version. You can view source code changes between game versions by checking the commit history or comparing branches. To play any version, specify it in the pip install command as demonstrated below.

General Usage

Pyglet, Cython, Pillow, PyOgg, NumPy, and nbtlib are required dependencies which can easily be installed with pip. Use the versions specified in requirements.txt. wxPython is an optional dependency for the level file picker, but if you don't have it then Tkinter is used instead.

For audio to work you will either need PyOgg which is recommended, or FFmpeg which has to be installed on your system. GStreamer is also supported on Linux through the gst-python library. PyOgg requires that your system have one of the Opus, FLAC, or Vorbis codecs. OpenAL is required and comes bundled with the source on Windows.

For a manual Cython source build, run python setup.py build_ext --inplace.

Run python -m mc.net.minecraft.client.Minecraft to launch the game. Minecraft: Python Edition should be compatible with any modern platform that supports OpenGL and Cython.

Run with the argument -fullscreen to open the window in fullscreen mode (or press F11 in-game). The argument -creative will force the game to be in creative mode.

Gameplay

All controls are as you would expect for the game and they can be configured in the options menu. Press I to open your inventory, F5 to toggle rain and F7 to take a cool isometric screenshot.

Smelting is unique in early Indev: to get iron or gold ingots, light the dropped ores on fire or throw them in lava.

The Indev level generator is customizable and you can choose between the Inland, Island, Floating, and Flat level types. You can specify the world theme as Normal or Hell (lava and dirt instead of water and grass), world size, and world shape (Square, Long, Deep).

Levels can be saved to a single .mclevel NBT file in the pause menu. The level files are perfectly compatible with Java and vice versa.

Humans may drop string on death, gunpowder, or feathers upon death.

Crafted mushroom bowl soup will restore health. Check the Wiki for crafting recipes added in this version.

Isometric screenshot

An isometric screenshot of a normal Island map generated by the game, with several spawn houses from map loading.

Additional Notes

The mc.resources directory contains all of the textures and sounds that this version uses. However, the textures are only there for convenience, as all of the texture buffers are already preloaded in the mc.Resources module.

This would have been much more challenging to work on without the great tools provided by RetroMCP-Java.

All credit for Minecraft goes towards its creator Notch and Mojang Specifications.

Metadata

Release files for minecraft-python 0.31.20100131

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for minecraft-python 0.31.20100131
File Interpreter ABI Platform
minecraft_python-0.31.20100131-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Release files / minecraft_python-0.31.20100131-cp310-cp310-macosx_10_9_x86_64.whl

Download URL minecraft_python-0.31.20100131-cp310-cp310-macosx_10_9_x86_64.whl
Size 10.3 MB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
bc823465bc0170f659c92961b4c009c690e32349952ca00274733d3be34f55e8
BLAKE2b-256 checksum
How to use checksums
203cd6504cbaec32b448743b1b15161171a1773b960ae617d3fa3a59662ce98e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page