Minecraft MakeCode Lessons

Code the Agent. Build the world. Learn the fundamentals.

About These Lessons

Each Minecraft lesson is self-paced. Open the lesson page, follow the steps, and work at your own speed. Every lesson ends with a small digital deliverable — usually a screenshot of your code and a screenshot of what you built in Minecraft.

These lessons cover the same programming concepts you'll see in AP Computer Science Principles — sequence, events, debugging, loops, conditionals, and procedures — with the Minecraft Agent as your test subject.

Start every lesson with Lesson 0

Before every Minecraft lesson, complete Lesson 0 — World Setup to create a fresh, distraction-free flat world. A new world every time keeps your work organized and prevents leftover blocks from previous lessons getting in your way.

Available Lessons

Lesson 0 · Setup

Get Minecraft Ready

World setup — do this before every lesson

Turn on fullscreen and create a brand-new flat world with the right settings: show coordinates, always day, no mobs, no weather. Five-minute reset before each Minecraft lesson.

Open Lesson 0
Lesson 1

Controlling the Agent

Sequencing, Events, and Agent Movement

Use a chat command to start a program, write a sequence of Agent moves, predict and debug what the Agent will do, then modify the starter code to build your own path or simple structure.

Start Lesson 1
Lesson 2

Loops & Patterns

Loops, Repetition, and Agent Patterns

Replace repetitive code with for loops, watch one number change the size of the whole result, debug an indentation bug, and use nested loops to build a square or grid pattern.

Start Lesson 2
Lesson 3

The Builder & Relative Coords

Recap, plus a faster tool and the tilde operator

Meet the Builder, learn relative coordinates with ~, and compare three ways to build the same shape — from walking-it-out with the Agent to one-shot mark() and line() calls.

Start Lesson 3
Lesson 4

Filling Spaces & Spawning Mobs

Whole-region builds with blocks.fill() and mobs.spawn()

Use two opposite corners to fill a room, arena, or aquarium in one line. Then loop mobs.spawn() with randpos() to bring the space to life with sheep, fish, or zombies.

Start Lesson 4
Lesson 5 · Capstone

Patterns, Functions & the Castle

Use i and j, math for round shapes, and parameterized functions

Make the loop counter part of what you build. Add modulo, abs(), and the Pythagorean theorem for pyramids and cones. Give your functions parameters and compose them into a moat-walled castle.

Start Lesson 5

More lessons coming soon