100% found this document useful (1 vote)
146 views22 pages

Minecraft Coding: City Planner Lessons

This educator guide provides 3 lessons for having students code a city in Minecraft using new coding blocks to design a road network, buildings, and houses; the first lesson has students manually build a sample road and then code a road using coordinates and block placement code; the guide includes objectives, vocabulary, and detailed instructions for educators to support students through each coding activity.

Uploaded by

Alya Al-Masaeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
146 views22 pages

Minecraft Coding: City Planner Lessons

This educator guide provides 3 lessons for having students code a city in Minecraft using new coding blocks to design a road network, buildings, and houses; the first lesson has students manually build a sample road and then code a road using coordinates and block placement code; the guide includes objectives, vocabulary, and detailed instructions for educators to support students through each coding activity.

Uploaded by

Alya Al-Masaeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Educator Guide

3 Lessons
Single Student

Computing with Minecraft:


2- City Planner

EDUCATION.MINECRAFT.NET

1
THEME OVERVIEW
This second unit in Computing with Minecraft provides students with the
opportunity to explore new coding blocks and how they can assist students when
building in Minecraft through code. At the end of these lessons, your students will
have designed and coded a road network, buildings, and houses in their Minecraft
city using the PLAYER, AGENT, and BLOCKS coding features.

LESSONS OVERVIEW
All of the following lessons are intended to be completed in 60-75 minutes,
depending on how much time is given to students to explore coding activities.
Lesson 1: Code a Road Network
Lesson 2: Code a Building
Lesson 3: Code a Row of Houses

LESSON OBJECTIVES
• Create code with an intended outcome
• Utilize multiple coding features into one outcome
• Understand how code is more efficient in create large-scale actions instead
of manual actions
• Use block code to change their Minecraft world

THINGS TO KEEP IN MIND


• Students are given a whistle in the first slot of their hotbar. This item allows
students to call the Agent directly to them (i.e., instead on having students
to code the Agent to teleport to them). The student will need to be standing
and facing in the direction they would like the Agent to teleport to.
• Students are given a compass in the second slot of their hotbar. This item
points to the world spawn point.
• Remind students that there may be more than one solution for each of the
activities.

MINECRAFT MECHANICS
C C
Summons the Agent and opens Code Builder
T T
Opens chat panel in Minecraft for commands to be typed
ESC ESC
When a student wants to leave the game, leave chat, or pause the
game

2
CODING BLOCKS
On chat command
Runs the code when the student types the chosen
text in the chat window
Agent Teleport to Player
Tells the Agent to turn left or right
Agent Move
Tells the Agent to move in a certain direction by a
defined amount
Agent Turn
Tells the Agent to turn left or right
Agent Place on Move
Tells the Agent whether to place a block (if set to
true) or not to place a block (if set to false)
Agent Place
Tells the Agent where to place a block
Agent Destroy
Tells the Agent to break a block in a specific
direction
Agent Set Active Slot
Sets the agent’s active inventory slot; Slots are
counted from left to right and then top to
bottom, starting at the top-left corner of the
agent’s inventory
Repeat
Creates a loop (which repeats a section of code
until a specific condition is met)

Clone
Clones (duplicates) a cubic region into a different
location

Relative
Creates a new relative position; A relative position
is the distance in each direction from the player’s
feet.

3
World
Creates a new world position; A world position is
the distance in each direction from the world’s
origin, which is (0, 0, 0). The distance is measured
in blocks.

KEY VOCABULARY
Minecraft – game-based learning platform with endless creativity and possibilities
Controls – provides the ability to move during game play (will differ based on
devices)
Code Builder – the coding editor program used in-game to create code
Agent – your own personal Robot you can program to complete tasks for you in
the game
Loops – repeats code a certain number of times until a condition is met
Positions – represents a specific location within a Minecraft world
Absolute World Position: a position based on a position in the world (i.e., the
distance from the world’s origin point (0, 0 ,0) to an object or entity)
Relative Player Position: a position that is based on where the player is (i.e.,
distance from the player to an object or entity)
Coordinates – uses a set of three numbers (coordinates) used to specify a position
in a Minecraft world (X, Y, Z)

ADDITIONAL RESOURCES
If you would like additional support about the concepts and skills covered in these
lessons, review the following resources:
• PLAYER blocks: https://minecraft.makecode.com/reference/player
• AGENT blocks: https://minecraft.makecode.com/reference/agent
• LOOPS blocks: https://minecraft.makecode.com/blocks/loops
• BLOCKS: https://minecraft.makecode.com/reference/blocks
• POSITIONS blocks and coordinates:
https://minecraft.makecode.com/reference/positions
• For additional support with Minecraft: Education Edition, contact the
support team at aka.ms/meesupport or engage with the educator
community at https://educommunity.minecraft.net/hc/community/topics

4
LESSON ACTIVITIES

LESSON 1: CODING A ROAD NETWORK

Direction Instruction (Teacher-Led; “I Do”)


We are going to continue to work on Computing with Minecraft (slide 1). Today’s
lesson is called “Code a Road Network” (slide 2).

Review the objectives on Slide 3.

The first thing we are going to do is prepare for our build. We are going to
complete 2 tasks before we code our network. We are going to plan the design of
our rode (slide 4)

The road we are going to create is going to be black and white—we are going to
plan the design on paper first using some numbers. (slides 5)

At the time, provide students with the handout, “Code a Road Network”. This
handout can be found at the end of this EDU guide. (slide 7)

After students have completed the handout, take time to recap the learning from
this task: (slide 8)
• How many white blocks are in the road?
• How many black blocks are in the road?
• Where do the white blocks start?
• Is there a pattern in the middle (where the white blocks are)?

Guided Instruction (Teacher Modeling; “We Do”)


For this task, you are going to have students log into Minecraft: Education Edition.
(slide 9)

Once students are logged in, you will use Slides 9-12 to guide them through the
beginning of the world. All students will start in the Teleport Hub. Instruct students
to talk to the Teleport Manager to receive guidance on how to navigate into the
second area—City Planner. City Planner can be accessed through the orange
portal.

Activity: Manually Build a Road Network (Slides 13-28)

5
We are going to manually build a road before actually coding the road network.
This will help students to visualize and better understand the code. You, as the
teacher, should demonstrate these steps for students. Students should follow
along as you monitor their progress.

In this activity, students will need to find a grassy area (slide 15). There is a great
spot located directly behind the Agency headquarters. Once you are in the grassy
area, allow students to switch over to Creative mode (slides 16-18). Then collect
gray concrete blocks from the inventory (slides 19-20). Now, students will need
clear out the grass blocks (slides 21-24) to make 5x10 area. Then students will need
to fill the area with the gray concrete blocks to make their road (slides 25-26).
Finally, students will use white carpet squares to make the road marks. Have your
students compare their design on paper to the road they manually created in
Minecraft (slide 27). Do they look the same? They should!

Have students return back to Adventure mode (slide 28).

Activity: Code a Road Network (Slides 29-28)


Start this activity by launching the tutorial (slide 29). Explain the important features
of Code Builder (slides 30-31)- students should start to familiarize themselves with
this vocabulary. Now, it is time to begin creating the code for the coding task
(slides 31-36).

Step 1: Rename the on chat command block to road_1


Step 2: Drag a fill with block into the on chat command block
Step 3: Use the drop-down menu to change the block types from grass to gray
concrete
Step 4: Drag a positions code block from the POSITIONS drawer
and replace both relative positions block inside the fill with block
Step 6: We will need to change the coordinates in our code. The first set of
coordinates is -21, 68, -565 and the second set of coordinates is 61, 68, -569

Now, we are going to test our code. Move into the correct position (slide 37).
Explain the rationale behind the code (slides 38-42)—students need to begin to
better understand the usefulness of coordinates in Minecraft. Test the code by
typing in road_1 into the chat field (slide 43). Your road should be complete! (slide
44)

6
Coding Solution:

Independent Work (Teacher Support; “You Do”)


This activity will have your students create the 2nd road on their own, using the
same coding concept of coordinates. Students will need to find the next starting
point for the road network (located directly behind the teleporter).

Coding Solution:

7
If time permits, allow students to complete the extension activity of placing the
white road marks (slide 46).

LESSON 1 CONCLUSION
Upon completion of this lesson, students should be able to answer the following
questions:

1. How is using Code Builder to create a road more efficient than manually
building a road?
Answer: It completes the task much quicker; saves time.
2. What’s the difference between absolute world position and relative
player position?
Answer: Absolute world position = A position that is based on position in
the world (in other words, the distance from the world’s origin point (0,
0, 0) to an object or entity). Relative player position = A position that is
based on where the player is (in other words, the distance from the
player to an object or entity)
3. What other ideas do you have for using positions when coding?
Answer: (Answers will vary)

These questions can also be used as a formative assessment. The formative


assessments can be found at the end of this document and can be printed out.

LESSON 2: CODE A BUILDING

Direction Instruction (Teacher-Led; “I Do”)


“We are going to work on Lesson 2 today. It is called ‘Code a Building’.” (slide 48)

Review the objectives on Slide 49.

In this lesson, students will create a house. Before they code the building, they will
plan the design of the house on paper and manually build the house so they can
better understand the code. (slide 50)

Provide the planning template (found at the end of this document) to all students.
Students will plan out a design of their house. (slide 51)

Guided Instruction (Teacher Modeling; “We Do”)


At the time, have all students log into Minecraft: Education Edition. (Slide 52)

8
Activity: Manually Build a House (Slides 53-62)
Once students are logged in, students should begin in the same location they left
off in (i.e., if they successfully completed previous lesson, “Code a Road Network”).
If not, they will need to teleport to the City Planner area.

Starting from this point, students will need to find an open spot in the grass by the
roads (slide 53). Now, instruct students to change the settings to switch over to
Creative mode (slides 54-56). Using the planning template, students need to select
their materials from the inventory (slide 57).

Step 1: Build the walls. The walls should be six blocks across and 4 blocks tall (slide
58)
Step 2: Build the roof. The roof will be a flat top roof. Slabs should be used to
completely cover the area. (slide 59)
Step 3: Place the door. Destroy the existing blocks in order to place the door into
the spot. (slide 60)
Step 4: Place the glass block for the window by destroying the block in the exact
spot you would like to place the window. (slide 61)

Your house is complete! Switch back to Adventure Mode (slide 62).

Activity: Code a Building (Slides 63-68)


In this activity, students will be code the Agent to build a house. Return to the Unit
2, Lesson 2 NPC. Press on the NPC to see the dialog box (slide 63). Select the
tutorial button to launch Code Builder (slide 64).

Step 1: Rename the on chat command block to build_a_structure


Step 2: Drag and drop the agent set active slot block into the on chat command
block
Step 3: Drag an agent place on move block into the on chat command block;
change the false element of this block to true
Step 4: Visit the LOOPS toolbox drawer and place a repeat 4 times block into the on
chat command set
Step 5: Place an agent move forward block and change the number to 5; the drag
an agent turn left block into the set
Step 6: Drag an agent move block into the set; change it to up
Step 7: Place an agent place on move block in the set; set the value to false
Step 8: Drag an agent move right by 1 block into the set

9
Step 9: Drag an agent place on move block and set the value to true
Step 10: Place another repeat 4 times block around this entire set of code
Step 11: Place an agent set active slot block and change the value to the number 2
Step 12: Drag a repeat 3 times block underneath
Step 13: Place agent move forward by 5 block, agent move left by 1 block, agent
move back by 5 block, and agent move left by 1 block
Step 14: Drag an agent place on move block and set the value to false under the
previous loop
Step 15: Drag an agent move down by 3 block and agent move forward by 1 block
into the set
Step 16: Drag an agent set active slot and change the value to 3
Step 17: Underneath this, place an agent destroy right block, agent place right,
agent move forward by 2, agent destroy right, agent move down by 1, and agent
destroy right
Step 18: Drag an agent set active slot and change the value to 4
Step 19: Drag an agent place right block into the set

Coding Solution:
(shown on next page)

10
11
Test your code (slide 66) and you should have a completed house (slide 67).

Independent Work (Teacher Support; “You Do”)


Now, it is the students turn to try to create another structure on their own (slide
68). They should try to create another structure using code. Students may return
to creative mode should they need to access additional inventory for their Agent.

LESSON 2 CONCLUSION
Upon completion of this lesson, students should be able to answer the following
questions: (slide 69)

1. What does the LOOPS toolbox drawer help you do?


Answer: It offers a series of code blocks that allow them to repeat code
without having to rewrite code without having to rewrite each repeated
line. It gives you options for timing your code, and when and how to start
your code. You can have code running from the very second you load it in
or running on an endless loop.
2. What other types of buildings could you create using the code you’ve
learned?
Answer: (Responses will vary)

These questions can also be used as a formative assessment. The formative


assessments can be found at the end of this document that can be printed out.

LESSON 3: CODE A ROW OF HOUSES

Direction Instruction (Teacher-Led; “I Do”)


We are going to work on Lesson 3 today. It is called “Code a Row of Houses”. (slide
71)

Review the objectives on Slide 72.

At the time, have all students log into Minecraft: Education Edition.

Guided Instruction (Teacher Modeling; “We Do”)


Activity: Manually Build a House

12
Once students are logged in, students should begin in the same location they left
off in (i.e., if they successfully completed Lesson 2). Students will need to gather
the preselected materials from the inventory. Drag and drop into the hotbar (Slide
74)

Starting from this point, students will need to press “C” to launch Code Builder. In
the first part of the coding task, students will see the image of a constructed
house. They will need to manually build a house in the designated area. They
should ONLY build in/on the area outlined by the yellow and black carpet squares.
(Slide 75)

Then, lead the students through the discussion (Slide 76) about how to begin the
coding task. Use Slides 77-78 to explain how they are going to gather the first set
of coordinates for their code. Use Slides 79-81 to explain how they are going to
gather the second set of coordinates for their code.

The clone block allows you to clone a designated area of a Minecraft world and
place it elsewhere. It’s like using copy and paste in other software. You copy an
area and then paste it somewhere else in your world.

When you clone, the orientation or direction of the building will be the same as the
copied building. So, if the building you copy is facing east, the cloned building will
also face east.

13
The clone block is a great block, but it is slightly tricky to understand at first.

The first two sets of coordinates represent


a three-dimensional box with the clone
from coordinates as one corner and the to
coordinates as the opposite corner,
capturing everything in between like the
box in the picture.

The third set of coordinates for the into


represents the coordinates you want the
cloned structure to paste into.

Coding Solution:

It is a good idea to practice in the air first. There is no undo button in Minecraft—
test it until you have it right and then clone it to the final location. (slide 84)

Independent Work (Teacher Support; “You Do”)


Activity: Clone a Row of Houses (Slides 85-86)
Students will find their desired location for their row of houses. You should
strongly suggest that they clone houses right next to their model house as these
houses will face the same direction.

14
LESSON 3 CONCLUSION
Upon completion of this lesson, students should be able to answer the following
questions: (Slide 87)

1. Since there is no undo button, what are some ways you can practice
without causing a loss of time and previous work?
Answer: Move, turn, destroy, collect, chop down trees, build things
2. Why is it helpful to manually build your house before using the clone
feature?
Answer: Right-click on the Agent (keyboard) or tap on the Agent (touch)
These questions can also be used as a formative assessment. The formative
assessments can be found at the end of this document that can be printed out.

15
EDUCATIONAL STANDARDS
UNITED STATES AUSTRALIA UNITED KINGDOM
DEVELOP PROGRAMS WITH SEQUENCES WRITING AND ENTERING A SIMPLE SET OF UNDERSTAND WHAT ALGORITHMS ARE;
AND SIMPLE LOOPS, TO EXPRESS IDEAS OR INSTRUCTIONS JOINTLY TO SEQUENCE HOW THEY ARE IMPLEMENTED AS
ADDRESS A PROBLEM. EVENTS AND INSTRUCTIONS PROGRAMS ON DIGITAL DEVICES ; AND
THAT PROGRAMS EXECUTE BY FOLLOWING
PRECISE AND UNAMBIGUOUS
INSTRUCTIONS

CSTA FOUNDATION TO YEAR 2 COMPUTING


1A-AP-10 ACTDIP004 KEY STAGE 1
DEBUG (IDENTIFY AND FIX) ERRORS IN AN CREATE AND DEBUG SIMPLE
ALGORITHM OR PROGRAM THAT INCLUDES PROGRAMS
SEQUENCES AND SIMPLE LOOPS.

CSTA COMPUTING
1A-AP-14 KEY STAGE 1
STUDENTS BREAK DOWN PROBLEMS INTO
COMPONENT PARTS, EXTRACT KEY
INFORMATION, AND DEVELOP DESCRIPTIVE
MODELS TO UNDERSTAND COMPLEX
SYSTEMS OR FACILITATE PROBLEM-
SOLVING.

ISTE
5C
STUDENTS UNDERSTAND HOW
AUTOMATION WORKS AND USE
ALGORITHMIC THINKING TO DEVELOP A
SEQUENCE OF STEPS TO CREATE AND TEST
AUTOMATED SOLUTIONS.

ISTE
5D

16
Computing with Minecraft: Unit 2, Lesson 1
Code a Road Network

In this lesson, you are going to create a road for your Minecraft city. We are going to practice the
design of the road on this planning sheet first before building and coding in the game.

Each of these squares represent a block in Minecraft. This is going to be our road.
• If there is a number 1 in the square, color the square BLACK.
• If the square is blank, leave it white.

1 1 1 1

1 1 1 1

1 1 1 1 1

1 1 1 1 1

1 1 1 1

1 1 1 1

1 1 1 1 1

1 1 1 1 1

1 1 1 1

1 1 1 1

How many black squares are in our road? _________________

How many white squares are in our road? _________________

17
Computing with Minecraft: Unit 2, Lesson 2
Code a Building

In this lesson, you are going to create a house for your Minecraft city. We are going to practice the
design of the house on this planning sheet first before building and coding in the game.

WALLS OF THE HOUSE

This is what the walls will look like if you are standing on the outside of the house and facing
forward towards the house.

Now, remember… houses have more than one wall.

How many walls will our house have? ______________

ROOF OF THE HOUSE

We have to have a roof to protect everything inside of the house.


We are going to build a simple, flat roof to go directly over the 4 walls of the house.

This is going to be the design of the roof.


This is what it will look like if you fly above and look directly below at the roof beneath you.

How many blocks are used in the roof? _________________

18
Computing with Minecraft: Unit 2, Lesson 2 (continued)
Code a Building

WINDOW AND DOOR FOR THE HOUSE

We need to place a door and a window for our house.

Color the spaces for where the door and window will be placed.

INVENTORY MATERIALS FOR THE HOUSE

Pretend that this is your hotbar. What inventory materials will you need to build your house?
Draw the materials into the hotbar. Then use the space below to label what is in each of the slots.

19
NAME: _______________________________________________________ DATE: _____________________________

CITY PLANNER: LESSON 1 FORMATIVE ASSESSMENT

How is using Code Builder to


create a road more efficient
than manually building a
road?

What’s the difference


between absolute world
position and relative player
position?

What other ideas do you have


for using positions when
coding?

20
NAME: _______________________________________________________ DATE: _____________________________

CITY PLANNER: LESSON 2 FORMATIVE ASSESSMENT

What does the LOOPS


toolbox drawer help you do?

What other type of buildings


could you create with the
code you’ve learned?

21
NAME: _______________________________________________________ DATE: _____________________________

CITY PLANNER: LESSON 3 FORMATIVE ASSESSMENT

Since there is no undo button


in Minecraft, what are some
ways you can practice
without causing a loss of time
and previous work?

Why did we draw our houses


on paper before writing the
code?

22

You might also like