This edition first published 2015
2015 John Wiley and Sons, Ltd.
Registered office
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
All photographs used in this work courtesy of S K Pang, 2014.
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/ or its affiliates in the United States and/or other countries, and may not be used without written permission. Minecraft is a registered trademark of Mojang Synergies AB Corporation. All other trademarks are the property of their respective owners. John Wiley & Sons, Ltd. is not associated with any product or vendor mentioned in the book.
A catalogue record for this book is available from the British Library.
ISBN 978-1-118-94691-6 (paperback); ISBN 978-1-118-94685-5 (ePub); 978-1-118-94684-8 (ePDF)
Set in Chaparral Pro 10\12.5 by TCS\SPS
Printed and bound in Great Britain by Bell & Bain
For my wife Leonie, without you, this would never have been.
Martin.
For my wife Gail, for putting up with me while I con-stantly played Minecraft.
David.
Publishers Acknowledgements
Some of the people who helped bring this book to market include the following:
Editorial
Publisher: Barry Pruett
Associate Publisher: Jim Minatel
Executive Commissioning Editor: Craig Smith
Acquisitions Editor: Aaron Black
Project Editor: Sydney Argenta
Copy Editor: Grace Fairley
Technical Editor: Cliff OReilly
Editorial Manager: Mary Beth Wakefield
Senior Project Editor: Sara Shlaer
Editorial Assistant: Jessie Phelps
Illustrator: Sarah Wright
Marketing
Marketing Manager: Lorna Mein
Marketing Assistant: Polly Thomas
Minecraft Consultants
Zachary Igielman
Lauren Trussler
Sam Whale
Ben Foden
Ben Ramachandra
Ria Parish
About the Authors
MARTIN OHANLON has been designing and programming computer systems for all of his adult life. His passion for programming and helping others to learn led him to create the blog (www.stuffaboutcode.com) where he shares his experiences, skills and ideas. Martin regularly delivers presentations and workshops on programming Minecraft to coders, teachers and young people with the aim of inspiring them to try something new and making programming fun.
DAVID WHALE writes computer programs for devices you wouldnt imagine have computers inside them. He was bitten by the computer programming bug aged 11 when he was at school, and still thoroughly enjoys writing software and helping others to learn programming. He runs a software consultancy business in Essex, but also regularly volunteers for The Institution of Engineering and Technology (The IET) helping in schools, running weekend computing clubs, judging schools competitions, and running programming workshops for young people at community events all around the UK. You can follow his adventures on his blog at http://blog.whaleygeek.co.uk.
Acknowledgments
Many people are involved in producing a book, too many to mention in this small space. We would both like to give our special thanks to the following people:
- The staff at Mojang, for designing such a great game, and their genius and insight in making the game programmable. Without this insight, this book would not have been possible.
- The Raspberry Pi Foundation and the open source community, without which there wouldnt be a Raspberry Pi or a Bukkit server, both of which are vital platforms that enabled this book to be written for a wide audience.
- Our testers and young Minecraft experts, Zachary Igielman, Lauren Trussler, Sam Whale, Ben Foden, Ria Parish, who tried our programs and provided really useful feedback, without which we would never have known if we were pitching the book correctly to the target age group.
- Mr S.K.Pang, for all his advice and help with selecting the right electronic components for our projects, and for helping us to make it possible to easily and cheaply control electronic circuits from the PC and the Mac.
- Cliff OReilly, for making sure everything was technically right, and for testing everything 3 times for us (once each on the 3 different computer plat-forms).
- Sarah Wright, for the truly amazing illustrations throughout this book. They are beautiful pieces of visual artwork, and cleverly and perfectly capture the concepts being presented in each adventure.
- Ben Ramachandra, the young lad at the Christmas 2013 Fire Tech Camp event at Imperial College, London: You were so determined to follow the Python course entirely in Minecraft, which was the moment that caused the idea for this book to spark into existence!
- Roma Agrawal, structural engineer for The Shard, UK: for her suggestions and links to inspiring tall buildings in Adventure 4 and the Bonus Adventure lets hope we see some amazing creations from our readers!
- Last, but not least, we would like to thank Carrie-Anne Philbin, for having the vision and determination to write her first book Adventures in Raspberry Pi , without which the Adventures series of books would not existnow, see what youve started, Carrie-Anne?!
WE HOPE THE adventures in this book have given you a whole range of ideas, code snippets and skills, and inspired you to take your Minecraft programming adventures further. Where you go from here is up to you and your imagination! If youre not sure what you want to do yet, or have an idea for your next project but dont know where to start, here are some interesting resources you can investigate to get those ideas flowing!
Websites
The Internet has a wealth of useful websites with information about Minecraft, almost too much to sort through, but here are some sites that Martin and David have found useful when learning, playing and programming Minecraft:
Next page