PYTHON Hacking Minecraft with Python
Using Python, in this tutorial we’re going to hook directly into Minecraft to edit our player world and the characters within in it, all using Python. While Python 3 is an incredibly versatile high-level programming language, as you may know Minecraft was originally developed using Java, so we’re going to have to install a few add-ons to be able to hook directly into Minecraft with Python.
Fortunately, Minecraft’s developers Mojang has released a version specifically for the Raspberry Pi – the Minecraft Pi Edition – that comes with an API for budding programmers, so we’re going to take advantage of this. The following tutorial will work whether you’re using a Raspberry Pi or a regular desktop variety of Linux.
We’ve put together a package that allows Python to hook into Minecraft, called McPiFoMo (http:// rogerthat.co.uk/McPiFoMo.rar). Simply extract the contents of its .minecraft directory into your ~/home/.minecraft directory and you’re good to go.
McPiFoMo includes MCPiPy (from ) – a Python plug-in – and Raspberry Jam (), which uses Forge to enable the McPiPy. Provided you have Python installed, which is pretty standard on most distros, no additional software is required other than your favourite text editor or Python IDLE.
You’re reading a preview, subscribe to read more.
Start your free 30 days