Minecraft – Hour of Code: INTRO

Alphabets Sounds Video

share us on:

In the lesson “Discovering Minecraft Coding with Jeb,” participants learn the fundamentals of computer science by programming a character, Alex, to navigate a Minecraft world using Blockly, a visual programming tool. By dragging and dropping command blocks, learners create simple programs that translate into JavaScript code, helping them understand essential programming concepts while enjoying the interactive Minecraft environment. The session encourages creativity and exploration in coding, making it accessible and fun for beginners.

Discovering Minecraft Coding with Jeb

Hi there! My name is Jens Bergensten, but most people call me Jeb. I’m the lead developer for Minecraft at Mojang. I started programming when I was about 11 or 12 years old because I wanted to create my own games. A friend of my dad’s encouraged me to learn programming, and that’s how my journey began. I love designing and figuring out how things work, which is one of the reasons I enjoy Minecraft so much.

Learning to Code with Minecraft

In this fun session, you’ll learn the basics of computer science by programming a character to move through a Minecraft world. Instead of using traditional text-based programming, we’ll use a tool called Blockly. Blockly lets you drag and drop blocks to create programs, and behind the scenes, you’re actually writing JavaScript code! The skills you’ll learn are important for computer science and are used by programmers every day, including those who work on Minecraft.

Getting Started

First, you’ll choose a character. I’ll pick Alex. Let’s create a program to help her move around the screen. Your screen is divided into three main sections:

  • Minecraft Play Space: This is on the left side and is where your program will run.
  • Toolbox: In the middle, this is where you’ll find blocks that represent commands for Alex.
  • Workspace: On the right, this is where you’ll build your program by snapping blocks together.
Building Your First Program

To make Alex move, drag the moveForward() block to the workspace and click Run. Alex will move forward one space on the grid. If you want her to do more, like turn, you can add another block. Drag the turnRight() block under the moveForward() block until an orange line appears, then drop it to connect them. When you press Run again, Alex will follow the commands in the order you stacked them.

Tips and Tricks

If you need to remove a block, just drag it back to the toolbox. To start over, use the Start Over button in the top right corner of the workspace. Also, check out the little triangles on the turn blocks; they let you choose different directions.

Let’s Start Coding!

Now that you know the basics, it’s time to start coding and have fun with Minecraft! Enjoy creating your own programs and exploring the world of computer science.

  1. What inspired you the most about Jeb’s journey into programming, and how does it relate to your own experiences or aspirations?
  2. How do you think using a tool like Blockly can impact the way beginners learn programming compared to traditional text-based coding?
  3. Reflect on a time when you learned a new skill. How does the process of learning to code in Minecraft compare to that experience?
  4. What challenges do you anticipate facing when starting to code with Minecraft, and how might you overcome them?
  5. How does the concept of using blocks to represent code change your perception of programming?
  6. In what ways do you think learning to code through Minecraft can influence your problem-solving skills in other areas?
  7. What are your thoughts on the importance of creativity in programming, as demonstrated by Jeb’s work on Minecraft?
  8. How do you plan to apply the coding skills learned from Minecraft to other projects or areas of interest in your life?
  1. Create Your Own Minecraft Character

    Design a unique Minecraft character using paper and colored pencils. Think about what special abilities your character might have in the game. Share your design with the class and explain how you would program your character to move and interact in the Minecraft world.

  2. Blockly Block Challenge

    Work in pairs to create a sequence of Blockly blocks that will guide Alex through a maze. Use the moveForward() and turnRight() blocks to navigate. Once you complete the maze, swap with another pair and try to solve their maze using your programming skills.

  3. Code a Dance Routine

    Use Blockly to program a dance routine for Alex. Combine different movement blocks to make Alex perform a series of dance moves. Present your dance routine to the class and explain the sequence of blocks you used to create it.

  4. Debugging Detective

    Become a debugging detective! Work with a partner to find and fix errors in a pre-written Blockly program. Discuss what went wrong and how you solved the problem. Share your debugging strategies with the class.

  5. Design a Minecraft Obstacle Course

    Create a simple obstacle course in Minecraft and write a Blockly program to navigate through it. Use different blocks to overcome challenges and reach the end. Share your course and program with classmates and see if they can complete it using your code.

My name is Jens Bergensten, but I’m better known as Jeb. I’m the lead developer on Minecraft here at Mojang. I started programming when I was around 11 or 12 because I wanted to make games. A friend of my father’s encouraged me to learn programming to achieve that goal. I enjoy designing and figuring out the architecture of things, which is one of the aspects I love about Minecraft.

In this session, you’re going to learn the basics of computer science by programming a character to move through a simulated piece of a Minecraft world. Instead of traditional text-based programming, we’ll use Blockly, a system that allows you to drag and drop blocks to create programs. Underneath, you’re actually creating JavaScript code. The concepts you’ll learn are foundational to computer science and are used by programmers every day, including here at Mojang to develop Minecraft.

Before we begin, you’ll choose your character. I will select Alex. Let’s create a program to help her move around the screen. Your screen is divided into three main sections. On the left is the Minecraft play space where your program will run. Below that, you’ll find the instructions for each level. The middle area is the toolbox, where each block represents a command that directs Alex’s actions. The white space on the right is called the workspace, where we’ll build our program.

If we drag the moveForward() block to our workspace and click Run, Alex will move forward one space on the grid. If we want her to do something after moving forward, we can add another block. I’ll choose the turnRight() block and drag it underneath the moveForward() block until an orange line appears, then drop it to snap the two blocks together. When we press Run again, Alex will execute the commands in the order they are stacked in the workspace.

If you need to delete a block, simply drag it back to the toolbox. To undo changes and return to the starting point of the level, use the Start Over button in the top right corner of the workspace. Also, notice the little triangles on the turn blocks; these indicate that you can select different options.

Now, let’s start coding!

MinecraftA popular computer game where players build and explore virtual worlds made of blocks. – Example sentence: In Minecraft, you can create amazing structures using different types of blocks.

CodingThe process of writing instructions for a computer to follow. – Example sentence: We learned the basics of coding by creating a simple game in class.

ProgramA set of instructions that a computer follows to perform a task. – Example sentence: I wrote a program that can solve math problems automatically.

BlocksPieces of code that can be snapped together to create a program, often used in beginner coding environments. – Example sentence: Using blocks, I was able to make a character move across the screen.

CharacterA symbol or figure that represents a person or object in a computer program or game. – Example sentence: My character in the game can jump over obstacles and collect coins.

ToolboxA collection of coding blocks or tools that you can use to build your program. – Example sentence: I found the loop block in the toolbox to make my code repeat actions.

WorkspaceThe area on the screen where you arrange and connect coding blocks to create a program. – Example sentence: My workspace was filled with blocks that made my robot move in a square.

DragTo click and hold an item on the screen and move it to a different location. – Example sentence: I had to drag the blocks from the toolbox to the workspace to start coding.

RunTo start a program so that the computer can follow the instructions written in it. – Example sentence: After finishing my code, I clicked the run button to see if my game worked.

JavaScriptA programming language used to create interactive effects on websites. – Example sentence: We used JavaScript to make the buttons on our website change color when clicked.

All Video Lessons

Login your account

Please login your account to get started.

Don't have an account?

Register your account

Please sign up your account to get started.

Already have an account?