CAS Community   >   Resources   >  

Minecraft on Pi Python API Desktop Simulator

Let all your students write and test code on their desktop PCs that makes a 3d hollywood sign in minecraft running on a raspberry pi

Pete Dring

Created by Pete Dring
last edited Mar 02 2014 by Pete Dring

This resource came from an activity at Manor CE Academy in York for the Hour of Code initiative. I’d heard of students being able to write python code on a raspberry pi that controlled a minecraft world and wanted a way that a whole class of students could get involved without having to get a whole class set of Raspberry Pis set up.

Raspberry Pis are the marmite of education technology at the moment - you either love them or hate them.

The positives: Students love using them to learn to code. They’re cheap, easy to fix if someone breaks something and they’re designed to be used in programming and robotics experiments

The negatives: You can’t get a whole class physically using pne raspberry pi and most ICT rooms are full of desktop PCs already so it seems silly to replace them with raspberry pis that are slower and less powerful.

This project includes a minecraft python API simulator which means that each student can write and test their python programs on their own desktop PC and then change one line of code so that it runs on a networked Raspberry Pi running minecraft.

This means you can set up one raspberry pi in your classroom running minecraft but each student in your class can write code & test it both locally on their machine and on the shared raspberry pi.

The idea is a competition where students work in teams to race to make a 3d hollywood sign saying ‘hour of code’ in the shared minecraft world.

Level: (Intermediate) Students don’t need any programming experience to do this. I’ve done this with a y7 class who’d never heard of python before. It does take a little bit of setting up for the teacher though - you need a raspberry pi connected to the same network as the student PCs running minecraft:

Duration: (1 hr) I usually start with the video (10mins) which explains what to do while I distribute student instruction sheets to all the desktop PCs. If students work in groups to help each other out, it usually takes around 45 mins before the first team completes the challenge of getting their ‘hour of code’ hollywood sign displayed on the raspberry pi.

Teaches: (set of concepts learned) - Introduction to programming in python - Sequences of instructions - Data representation (2d coordinates for images)

Disclaimer: The minecraft simulator that students use isn’t affiliated with the Raspberry Pi foundation or Mojang. It lets students create blocks and move the camera but it doesn’t simulate the whole python API. It also doesn’t display all the different types of blocks perfectly. I’m sure you’ll find things that are wrong with it - it’s only designed to be a quick bodge job that’s used for educational purposes - not a fully developed solution!

Essential Links

-Download the minecraft simulator here:

-Download minecraft for the raspberry pi here:

-Watch the intro video here:

Recommended reading

-Read Craig Richardson’s blog on minecraft on pi here:

-Download Craig’s minecraft API quick reference here:

-Read Craig’s student booklet on minecraft python coding here:

-Read the teacher version here:

Downloaded 752 times.


This resource has attached files: to access these files, please tick the box below to assent to the license terms
License: The resources on CAS website are under Creative Commons Attribution-Share Alike 3.0 licence unless otherwise specified by the resource creators.

You must confirm that you have read and agree the licence's ToS before you can download the attachments of this resource.

I have read the licence agreement of this resource and agree to abide by its terms and conditions.

Feedback and Comments

Available when logged in (join via the front page, for free):
  • View 4 comments on this resource.
  • View resource history, links to related resources.
  • Leave feedback for the author(s), or help by editing the resource.

© 2021 BCS, The Chartered Institute for IT Registered charity: No. 292786
Using the websiteDisclaimer of liabilityCookies policyPrivacy notice