O'Reilly logo

Raspberry Pi For Dummies, 3rd Edition by Mike Cook, Sean McManus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13

Programming Minecraft with Python

IN THIS CHAPTER

check Exploring the Minecraft world

check Manipulating the Minecraft world in Python

check 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 has fired up imaginations to the extent that over 100 million copies have been sold across various platforms, including the PC and Xbox.

A version of Minecraft is available for the Raspberry Pi. It features only the Creative mode, where you can build items peacefully without the threat of monster attacks or starvation. The best feature is that 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 you can write programs that can invent original new structures for you to roam around and explore, as you see in this chapter.

The project in this chapter uses a Python program to build a maze in Minecraft. Each time you run the program, it builds a new maze for you, and you can control how big you want it to be and which materials you want it to be made of. During the course of this project, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required