Coding in Minecraft - an intro

Coding in Minecraft - an intro

All Ages

Computer Science

Digital Literacy


This is an introduction on how to get started with coding in Minecraft:EE, using Code Connection and Make Code!

avatar Submitted By: Peter Olofsson

April 2, 2018


  • Communication
  • Creativity
  • Project Based Learning

Learning Objectives

  • - Problem solving skills
  • - Fundamental understanding of how to use code to solve problems
  • - Igniting interest regarding (block)programming!

Guiding Ideas


Minecraft: EE provides great tools on how to get started with (block)programming! This lesson serves as a basic tutorial on how to get started with coding in Minecraft: EE!

How to get started?

You will need:

  • Minecraft: Education Edition
  • Download and install Code Connection (available here!)


The goal is to get started with programming in Minecraft:EE. The first thing you as an educator have to do is to install the Code Connection-plug in on each student computer (as well as on your own!). This plug-in program gives you access to the necessary tools in order to get started.

Comment: There could be a problem downloading the Code Connection plug in to the student computers if the IT administrators have turned off installations for them. Therefore it could be necessary to contact IT support on your school a while before you aim to get started. This is so they can download and install the necessary program (Code Connection) on each student computer you aim to work with!

When all students have access to the program on their units we can move on to the student activities!

Student Activities

Student activities and expectations

  • How to access Code Connection in relationship with Minecraft: EE
  • Understand the fundamentals of using block code in Microsoft Make Code
  • Be able to solve the first 3 mazes in the world "Agent Trials" using script based coding
  • Understand the basics of how code controls programs, software and other technical inventions

Performance Expectations

Lesson overview:

The first part of the session is to get started with Code Connection. Make sure that the students have started a new world using the template Agent Trials. The next step is to start the plug in "Code Connection".

When you start Code Connection an IP adress will show. Use the button on the right hand side to copy the IP adress and open Minecraft: EE. Use either "T" or "Enter" to open the chat in Minecraft:EE and then copy the IP adress into the empty row. Press enter.

This should enable a connection between the created Minecraft world and Code Connection. In this specific scenario we will use Make Code as programming tool --> therefore the students should click on that button! When inside Make Code, press the button called "New project".

First challenge:

Teleport your agent to a position! This is very necessary to solve the first problem. I usually instruct the students to use text based scripts when they first start using Make Code. This is normally quite easy for them to grasp and control!

The first step is therefore to use a "on-text block" to teleport their agent. I tend to tell them to use "tp" as a text script in Minecraft: EE, as it is a quite normal way of shortening the word "teleport".

The instructions for them to teleport the agent is usually the following:

  • Go to the blue section on the left hand side and choose a "on text"-block.
  • Change the text to "tp" without the quotations marks
  • Go to the red section on the left hand side and choose "Agent teleport to player"
  • Drag this block into the "on text"-block where it says "tp"
  • Use Alt + tab on your keyboard to change to Minecraft: EE
  • Open chat using "t" or "enter". Write "tp" without the quotation marks.
  • Watch the agent teleport to you flawlessly!

Second challenge:

Now the students understand the basic of how to create scripts to control the agent. This is usually the time when I discuss with the students how they should solve the following challenges. I tend to let them do it themselves in whatever way they prefer, as this enables me to follow their problem solving skills. Of course the educator should be with them at all times to help them out, but the interesting aspect here is that students tend to solve the mazes in their own way and by using their own logic.

Note: This step is mostly about supporting student to solve the problems on their own. Do not tell them the final solutions, but rather watch them solve it themselves in their own way!

Final notes:

I tend to use this start to just get them started with blockprogramming and fire up their interest. During our next sessions we take their skills further by looking at harder challenges and I also encourage them to create their own code for different purposes.

When the students are mature and secure enough, I tend to move over to JavaScript in Make Code to illustrate how their block code can become JavaScript and vice versa!


  • Communication
  • Creativity
  • Project Based Learning