Linux Format

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.

More from Linux Format

Linux Format1 min read
Ultimate Desktop Upgrade!
LXF316 will be on sale Tuesday 28th May 2024 Word processors that can help craft that novel you’ve always been talking about and organise large projects. Revive the old roleplaying system for a digital age as we recreate our own play-by-mail gaming
Linux Format4 min read
Linux
The #1 open source mag Future Publishing Limited, Quay House, The Ambury, Bath, BA1 1UA Email contact@linuxformat.com EDITORIAL Editor-in-chief Neil Mohr Art editor Fraser McDermott Production editor Katharine Davies Group editor-in-chief Graham Bar
Linux Format2 min read
Platform Support And Editions
Kali has a huge variety of install options, and these include images for ARM-based computers and pre-made virtual K machine images for most of the popular virtualisers. It’s even possible to install a version of Kali on to an Android-powered device.

Related