WHEN YOU PLAY Minecraft, you are playing a game that other people have designed for you. The Minecraft world is fun, but it’s even more fun if you can make it do the things that you want it to do. When writing Minecraft programs in Python, you now have a complete programming environment at your fingertips, and you can invent and program anything you can possibly imagine. This adventure introduces you to some of the fun things you can create using Minecraft and the programming language Python.
A really fun thing to do when programming Minecraft is to create a game within a game. Minecraft is the “world”, and your program will make this world behave in new ways. You will find that most Minecraft programs have three things that make them fun and exciting: sensing something about the world, such as the player position; calculating something new, such as a score; and behaving in some way, such as moving your player to a new location.
In this adventure you will learn how to sense your player’s position and make different things happen in the game as your player moves. In the welcome home game you build a magic doormat that greets you when you walk on it. We’ll introduce a technique called geo-fencing using a real Minecraft fence, and your game will challenge you and your friends to compete to collect objects in the fastest time possible. Finally you will learn how to move your player ...
Get Adventures in Minecraft now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.