Setup for Microsoft Windows¶
These are the steps to get a full development environment working on a Windows PC, in roughly the order you should perform them.
Figure Out Your System Type¶
Some of the software installed below requires the correct choice to be made between a 32-bit or 64-bit version of the software. You can learn the proper choice for your computer by checking your Computer Properties:
From your desktop, choose
, then right-click on and choose .In the window that opens, look for the System type under System. On a 64-bit system, it will say
64-bit Operating System
.Note
Remember this value for later.
Working Directory¶
Much of the work we do will involve a set of files on your
computer. It’s helpful if you organize these into a single
location. On a Windows PC, the default place for user files is in the
Documents
folder. We will start from there:
From your desktop, choose
to open a Windows Explorer view of yourDocuments
folder.In the window that opens, right-click in the main window and choose
. Give it the nameCoderDojo
.Double-click into the
CoderDojo
folder and again, right-click in the main window and choose . Give this one the nameMinecraftMod
.Note
From here on, we will refer to this as your
MinecraftMod
folder.Double-click into the
MinecraftMod
folder and again, right-click in the main window and choose . Give this one the nameCanaryMod
.
TortoiseGit and Git for Windows¶
TortoiseGit is a nice, GUI wrapper for Git on Windows. With this, you can use Git entirely from within Windows Explorer.
- Visit the TortoiseGit download page. Select the appropriate version based on your system type and download it.
- Once the file has downloaded, run it. You can leave all the installer options at their defaults. Allow it to install.
- Visit the git for windows download page. Click on the Download link.
- Once the file has downloaded, run it. You can leave all the installer options at their defaults. Allow it to install.
- Now is a good time to reboot your PC.
CanaryMod Server¶
Visit the CanaryMod download page.
Right click on the link to the Jar file and save it within the
MinecraftMod\CanaryMod
folder.In the
MinecraftMod\CanaryMod
folder, create a new file namedstartserver.bat
, and give it the following contents:CanaryMod-1.7.10-1.1.2.jar pauseIn the
MinecraftMod\CanaryMod
folder, create a new file namedeula.txt
, and give it the following contents:eula=true
Give the CanaryMod server a test run by double-clicking on the startserver.bat script you created. The CanaryMod: Minecraft server window should open, and you should see log messages indicating that the server is running.
RaspberryJuice for CanaryMod¶
We’re going to use Git to clone the repository where RaspberryJuice comes from. The Jar file containing the plugin is available in the repository, so we will copy it from there.
- Visit the GitHub page for the CanaryRaspberryJuice plugin.
- On the right-hand side of the page, you will see a field labeled HTTPS clone URL. Copy the value from here into your clipboard. It will be something like
https://github.com/martinohanlon/CanaryRaspberryJuice.git
.- Using Windows Explorer, navigate to your
MinecraftMod
folder.- Right-click within the main panel and choose
.- In the window that opens, double check that the URL field contains the one you copied above, that the Directory field specifies the
MinecraftMod\CanaryRaspberryJuice
folder, and then click OK.- After the Clone process finishes, open the
MinecraftMod\CanaryRaspberryJuice\jars
folder. Copy the file namedcanaryraspberryjuice-1.3.jar
intoMinecraftMod\CanaryMod\plugins
.
Restart the CanaryMod server again (double-clicking on the
startserver.bat script). This time, among the log messages,
you should see one that reads [INFO]: Enabling
CanaryRaspberryJuicePlugin Version 1.3
.
Minecraft¶
Visit the Minecraft download page.
Right click on the
Minecraft.exe
and save it into yourMinecraftMod
folder.Do the same with the
Minecraft_server.1.8.9.exe
file. We plan to use the CanaryMod server instead, but it may be useful to have the vanilla server for troubleshooting.Give Minecraft a test run by opening the
MinecraftMod
folder in Windows Explorer. Then double-click onMinecraft.exe
.Once the Minecraft Launcher opens, create a new Profile that is configured to use Minecraft version 1.7.10 (consistent with the CanaryMod server version).
Click New Profile.
In the Profile Editor dialog, change the fields as follows:
Field Value Profile Name MinecraftMod 1.7.10
Use version release 1.7.10
Then click Save Profile.
Python 2.7.8 for Windows¶
- Visit the Python Downloads page for Windows.
- Be sure to locate the 2.7.8 version of Python, and then select the right installer based on your system type.
- Once the file has downloaded, run it. You can leave all the installer options at their defaults. Allow it to install.
CoderDojo TC’s python-minecraft
Repository¶
We’re going to use Git to clone the repository where the CoderDojo Twin Cities chapter has stored the example Python scripts.
- Visit the GitHub page for the CoderDojoTC python-minecraft repository.
- On the right-hand side of the page, you will see a field labeled HTTPS clone URL. Copy the value from here into your clipboard. It will be something like
https://github.com/CoderDojoTC/python-minecraft.git
.- Using Windows Explorer, navigate to your
MinecraftMod
folder.- Right-click within the main panel and choose
.- In the window that opens, double check that the URL field contains the one you copied above, that the Directory field specifies the
MinecraftMod\python-minecraft
folder, and then click OK.
Environment Shakeout¶
Now that all the necessary parts have been installed, let’s see if everything is in working order.
- Shut down the Minecraft game, if it is running. Shut down the CanaryMod server, if it is running.
- Start the CanaryMod server by double-clicking on the startserver.bat script you created in the
MinecraftMod\CanaryMod
folder.- Start Minecraft by opening the
MinecraftMod
folder in Windows Explorer. Then double-click onMinecraft.exe
.- Once the Minecraft Launcher opens, choose the
MinecraftMod 1.7.10
Profile, and click Play.- Once the game starts, click the Multiplayer button. Choose the Direct Connect button on the next page. Enter
localhost
in the Server Address button and then press Join Server.- Once your player has joined the game, from the Windows desktop, choose
to open a Python Shell.- In the Python Shell, choose
and navigate to theMinecraftMod\python-minecraft
folder. Choosehello_world.py
.- Choose
, and look for the “Hello Minecraft” message within the game.
If you saw the “Hello Minecraft” message, congratulations! You are ready to proceed. If you ran into any problems with the environment shakeout, you should examine the error messages you might be seeing, think about what they might mean, and revisit the appropriate section of this document. Or, ask for help!