Setting up your system for Minecraft coding
You will need to own Minecraft Java Edition. You can download it here
If you already have a Mojang account, click login. If you haven’t accessed it for years you may need to reset your password. If you already own Minecraft it will then tell you. If you don’t have a Mojang account, create one, and buy Minecraft Java Edition. It is on sale at half-price at the moment.
The rest of the set-up we can do in class, but for those who want a head start, read on.
You need to install Java Runtime Environment version 8.
Download the Adventures In Minecraft Starter Kit and unpack it in a folder on your desktop. There are videos on the site that explain how to set it up.
I suggest before you first run the server you edit the file Server/server.properties (use Notepad or some other text editor) and change
to generate a flat world. (But it’s up to you what sort of world you prefer!)
To run the server, double click the StartServer file. It will open a server console window, and ask you press space.
If you want to generate another world later you can change
and then run the server again.
Once server is running, to stop nighttime from happening I suggest you type this at the server console
gamerule doDaylightCycle false time set day
If only we could do that in real life!
You must leave the server console window open at all times. When you want to quit, first type
at the server console, so it saves your world.
Run the Minecraft launcher you downloaded from minecraft.net. We will not be using the default which is the latest version of Minecraft. Instead we will be using version 1.12.
Click ‘launch options’ then ‘add new’, then set version to ‘release 1.12’. Then click ‘save’. Then click ‘Minecraft’ at the top. Then click the arrow next to ‘Play’ at the bottom. Then select ‘1.12’. Then click ‘Play’.
Minecraft will run. Click ‘multiplayer’. Then ‘add server’. Enter the server address as
Click ‘done’. Click on your server to connect to it.
Mu is the Python editor we have already been using, so you probably already have it installed. However you need to make sure you have the latest ‘alpha version 1.1’, not the regular 1.0. You can download it from the links at the top of this page.
Run Mu. Click ‘Mode’ and select ‘Python3’.
Then click the small gadget icon in the bottom right hand corner of the window. Click ‘third party packages’. Type
Into the box. Click OK. The library will download.
Now you are ready to type in and run a Minecraft program in Mu. Here is one to get you started.
import mcpi.minecraft as minecraft mc = minecraft.Minecraft.create() mc.postToChat("Hello Minecraft World")
If that is all too confusing, don’t worry. I will show you how to do it in class.