9781118946916-co0501.tif

WHEN YOU PLAY in the Minecraft world, even with the programming interface, it is a virtual world. The only way you can interact with the game is by using your keyboard and mouse to direct the controls that were designed by the engineers who designed the program.

But there’s another way to interact with Minecraft—by breaking out of the barriers imposed by the sandbox game and linking it to the physical world. Here you will quickly discover that the lines between what is virtual and what is real become blurred and your gaming experience becomes even more creative and exciting.

In this adventure you will learn how to link Minecraft to small electronic circuits through the API. You will begin by wiring up a light that flashes when you walk into your house. Then you are going to add a special type of display called a 7-segment display; you can use this to display countdowns and other information about your game as you interact with Minecraft. You will add a button that you can press to trigger all sorts of interesting actions in Minecraft. Finally, you are going to put all of it together to make a big red, fully functional detonator button counting down to an explosion, just like the one in Figure 5-1. It means you’ll never have any difficulty clearing space for your building adventures in Minecraft again, and your friends will marvel at your new magic tricks and ask you to create ...

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.