Code Builder brings block based programming (MakeCode) into Minecraft. Students write code that an in game agent runs, turning loops and conditionals into visible actions.
Objective
Students use sequences, loops and simple conditionals to make the agent complete a task.
Materials
Minecraft Education Edition
Code Builder (press C in game)
Steps
Open Code Builder and connect MakeCode. Move the agent forward with a single block.
Use a repeat loop to make the agent build a 5 block wall.
Add a turn so the agent builds a square.
Introduce an if statement: place a block only if the space ahead is empty.
Challenge: have the agent plant a row of crops using a loop.
Discussion questions
Why is a loop better than copying the same block five times?
What does the if statement let the agent decide?
How is giving instructions to the agent like writing any program?
Variations
Older students convert the same logic to the JavaScript tab in MakeCode to see text based code.