
- Type
- Lesson plan
- Grade
- Primary (Grades 3-5)
- Ages
- Ages 8-10
- Skills
- Critical thinking
How can coded loops automate construction, and which materials provide the greatest resistance to an explosive blast?
Overview
Different construction materials have distinct physical properties, including how well they endure explosive forces. By combining basic engineering inquiry with computer programming, students can explore structural durability in a standardized and measurable way.
Using Minecraft Education and Code Builder, learners program an automated agent to erect identical five-story towers using wooden planks and an alternative block of their choosing alongside a pre-existing straw structure. Once built, students spawn creepers on each tower, track surviving blocks after detonation, and compile their data into a class durability ranking.
Learning objectives
By the end of this lesson students will be able to:
- Program the agent using repeat loops to build a 4x4, five-story tower.
- Modify existing code to construct an identical tower out of a different chosen material.
- Conduct a controlled blast investigation using creepers to test material durability.
- Gather and organize post-explosion block counts to rank materials by blast resistance.
Blocks and items used in this lesson
Key vocabulary
- Loop
- A programming command that repeats a block of code multiple times to keep scripts short and efficient.
- Blast Resistance
- A Minecraft block property that determines how well it withstands an explosion without being destroyed.
- Agent
- A programmable helper in Minecraft that can move, carry items, and place or break blocks based on code.
Before class
Lesson sequence
- Introduction and Observation
Introduce the engineering challenge and discuss how repeat loops simplify repetitive building tasks. Have students inspect the pre-built straw tower and identify the red sandstone blocks that mark the center of each building platform.
- Coding the Wood Plank Tower
Instruct students to load their agent with wooden planks. Students then write code using movement, placement, and repeat loop commands to construct a solid 4x4 base tower that stands five stories tall.
- Replicating with a Chosen Material
Students duplicate their working code, swap out the agent inventory with a block material of their own choice, and run the program on the next platform to build an identical third tower.
- Creeper Blast Testing
Switch game conditions to Survival on Normal difficulty and invite classmates to stand atop each tower. Spawn a creeper on each structure to initiate an explosion, then have students count and record the remaining intact blocks.
- Data Sharing and Reflection
Combine individual block counts into a shared class data table to establish a blast resistance ranking. Close with a discussion on how loops helped streamline the coding process and what challenges students solved.
Assessment: success criteria
- The agent successfully builds a solid 4x4, five-story wooden tower using coded commands.
- The code is adapted to construct an identical tower using an alternative material.
- Post-explosion block counts are accurately tallied and contributed to the class data table.
- The student explains the function of a repeat loop and evaluates how their chosen block compared to other materials.
Differentiation
Allow students to code their tower in smaller increments, building one level at a time, or consult the tower building tutorial before assembling full loops.
Encourage students to automate the entire five-story tower within a single compact loop script without breaking the build into multiple manual stages.
Knowledge check
5 questions to check understanding after the lesson. Tap an answer to see if it is right; the score appears at the end.
1What base dimensions and height must the agent build for each tower?
Answer: B. The source specifies that the agent must build a solid tower with a 4x4 base that is 5 stories tall.
2Why is a repeat loop helpful when coding the agent to build a tower?
Answer: C. Loops allow coded statements to be repeated, which encourages more succinct commands.
3Which blocks indicate the center of each building platform?
Answer: A. The source notes that red sandstone blocks on each platform help students center each tower.
4Which game settings are required before testing creeper explosions on the towers?
Answer: D. Visiting players must have their game conditions set to Survival with Difficulty set to Normal.
5How do students determine the blast resistance ranking of each tested material?
Answer: B. Students count the number of blocks remaining on each tower after the explosion to rank material blast strength.
Resources
- World FileWorld file for student use
- Lesson worldOpens the world page in Minecraft Education (sign-in with a school account may be needed).
Part of the Code for STEM curriculum
This is lesson 6 of 20 in Code for STEM.
- 3-D Fractions
- Aquarium
- Build a Dam
- Canyon Arch Bridge
- Chicken or the Egg
- Creeper Tower Test
- Energy Transfer
- Forces
- Hour of Code: AI for Good
- Minecraft Code Town
- Molecules
- Number Line Railroad
- Plate Motions
- Road Construction Ahead
- Scale
- Slope
- Surface Area and Perimeter
- Units of Measurement
- Walled Fortress
- Wave Properties
Frequently Asked Questions
What materials are compared during this lesson?
Students compare three materials: a pre-built straw tower, a replica tower built from wooden planks, and a third identical tower built from a block material of the student's choice.
What should students check if their agent fails to place blocks while moving?
Ensure that the building blocks have been placed into the agent's inventory and that the place on move command is set to true in Code Builder.
Can students work collaboratively on this engineering challenge?
Yes, students can complete the building and coding tasks individually or in pairs, and they can host classmates in their worlds to stand on towers during blast testing.
Adapted from Creeper Tower Test by John Miller on Minecraft Education, last updated Dec 3, 2024. This classroom version, the timings and the quiz were written by 9Minecraft Education.























