Skip to Main Content
Adventures in Minecraft, 2nd Edition
book

Adventures in Minecraft, 2nd Edition

by David Whale, Martin O'Hanlon
November 2017
Intermediate to advanced content levelIntermediate to advanced
320 pages
6h 57m
English
Wiley
Content preview from Adventures in Minecraft, 2nd Edition
image

ONE WAY YOU can make a Minecraft game more interesting is to make it change what it does based on what is going on around your player. As you move around the game world, the choices that you are faced with depend on what you've already done, which makes the game slightly different every time you play it. The Minecraft API allows you to interact with blocks by finding out what block type you are standing on and detecting when you hit a block with your sword.

In this adventure, you first learn the basics of interacting with blocks by writing a magic bridge program. This bridge is special, because as you walk on water or walk into the sky, a bridge magically appears in front of you to keep you safe. Soon your Minecraft world will fill up with bridges. Version 2 of your magic bridge builder uses a Python list to remember where you built the bridge and makes it do a disappearing act right before your eyes when you land on safe ground again!

Finally, you learn how to sense that a block has been hit and then build an exciting treasure hunt game using your magic bridge to find and collect treasure that appears randomly in the sky, complete with a homing beacon and a score.

In this adventure you work just like a real software engineer, building up a large program one function at a time, and finally stitching it all together at the end to make an exciting larger program. Fasten your seatbelt ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Ultimate Player’s Guide to Minecraft, Third Edition

The Ultimate Player’s Guide to Minecraft, Third Edition

Stephen O’Brien
Minecraft Modding For Kids For Dummies

Minecraft Modding For Kids For Dummies

Sarah Guthals, Stephen Foster, Lindsey Handley

Publisher Resources

ISBN: 9781119439585Purchase book