Computer ScienceScience & MathematicsEconomics & FinanceBusiness & ManagementPolitics & GovernmentHistoryPhilosophy

Coding with Minecraft

Build Taller, Farm Faster, Mine Deeper, and Automate the Boring Stuff

by Al Sweigart

Coding with Minecraft

Subscribe to new books via telegram channel

DescriptionTable of ContentsDetailsHashtagsReport an issue

Book Description

You've mined for diamonds, crafted dozens of tools, and built all sorts of structures - but what if you could program robots to do all of that for you in a fraction of the time?

In Coding with Minecraft, you'll create a virtual robot army with Lua, a programming language used by professional game developers. Step-by-step coding projects will show you how to write programs that automatically dig mines, collect materials, craft items, and build anything that you can imagine. Along the way, you'll explore key computer science concepts like data types, functions, variables, and more.

Learn how to:
- Program robots that make smart decisions with flow control;
- Reuse code so that your robots can farm any crop you want, including wheat, sugar cane, and even cacti!;
- Program a factory that generates infinite building supplies;
- Design an algorithm for creating walls and buildings of any size;
- Code yourself a pickaxe-swinging robotic lumberjack!;
- Create a robot that digs mine shafts with stairs so you can explore safely.

Bonus activities in each chapter will help you take your coding skills to the next level. By the end of the book, you'll understand how powerful coding can be and have plenty of robots at your beck and call.

This open book is licensed under a Creative Commons License (CC BY-NC-SA). Free download in PDF format is not available. You can read Coding with Minecraft book online for free.

Table of Contents

Chapter 1
Getting Started with Minecraft and Computercraft
Chapter 2
Basic Lua Programming for Turtles
Chapter 3
Talking to Your Turtle
Chapter 4
Programming Turtles to Dance
Chapter 5
Making a Better Dancer
Chapter 6
Programming a Robo Lumberjack
Chapter 7
Creating Modules to Reuse Your Code
Chapter 8
Running an Automated Tree Farm
Chapter 9
Building a Cobblestone Generator
Chapter 10
Making a Stone Brick Factory
Chapter 11
Constructing Walls
Chapter 12
Constructing Rooms
Chapter 13
Constructing Floors
Chapter 14
Programming a Robotic Farm
Chapter 15
Programming a Staircase Miner
Appendix A
Function Reference
Appendix B
Name ID Reference

Book Details

Coding with Minecraft
Computer Science
No Starch Press
ISBN13 Digital
ISBN10 Digital

Related Books

Error-Correction Coding and Decoding
This book discusses both the theory and practical applications of self-correcting data, commonly known as error-correcting codes. The applications included demonstrate the importance of these codes in a wide range of everyday technologies, from smartphones to secure communications and transactions. Written in a readily understandable style, the boo...
Analyzing Qualitative Data with MAXQDA
This book presents strategies for analyzing qualitative and mixed methods data with MAXQDA software, and provides guidance on implementing a variety of research methods and approaches, e.g. grounded theory, discourse analysis and qualitative content analysis, using the software. In addition, it explains specific topics, such as transcription, build...
PHP: The Right Way
There's a lot of outdated information on the Web that leads new PHP users astray, propagating bad practices and insecure code. PHP: The Right Way is an easy-to-read, quick reference for PHP popular coding standards, links to authoritative tutorials around the Web and what the contributors consider to be best practices at the present time. T...
The Security Development Lifecycle
Your customers demand and deserve better security and privacy in their software. This book is the first to detail a rigorous, proven methodology that measurably minimizes security bugs - the Security Development Lifecycle (SDL). In this long-awaited book, security experts Michael Howard and Steve Lipner from the Microsoft Security Engineering Team ...
Guide to NoSQL with Azure Cosmos DB
Cosmos DB is a NoSQL database service included in Azure that is continuously adding new features and has quickly become one of the most innovative services found in Azure, targeting mission-critical applications at a global scale. This book starts off by showing you the main features of Cosmos DB, their supported NoSQL data models and the foundatio...
Learning Minecraft Bukkit
Bukkit is a simple API that allows for modifying the normal Minecraft multiplayer experience using plugins. It is an unofficial and free Minecraft Bukkit book created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow....