Chapter 13

Programming Minecraft with Python

In This Chapter

arrow Installing Minecraft

arrow Exploring the Minecraft world

arrow Manipulating the Minecraft world in Python

arrow Generating a random Minecraft maze in Python

Minecraft appeals to the Lego fan in everyone. It enables you to build immersive 3D worlds from blocks of materials, and it’s fired up imaginations to the extent that an estimated 20 million copies have been sold across platforms, including the PC and Xbox.

An early development version of Minecraft is available for the Raspberry Pi. It features only the creative mode, where you can build things peacefully without the threat of monster attacks or starvation, but it has one neat twist: You can program it using multiple languages, including Python. This means that you can build a grand palace without having to manually place every block, and can write programs that can invent original new structures for you to roam around and explore, as you see in this chapter.

This project uses a Python program to build a maze in Minecraft. Each time you run the program, it will build a new maze for ...

Get Raspberry Pi For Dummies, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.