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:

  1. From your desktop, choose Start, then right-click on Computer and choose Properties.

  2. 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:

  1. From your desktop, choose Start ‣ Documents to open a Windows Explorer view of your Documents folder.

  2. In the window that opens, right-click in the main window and choose New ‣ Folder. Give it the name CoderDojo.

  3. Double-click into the CoderDojo folder and again, right-click in the main window and choose New ‣ Folder. Give this one the name MinecraftMod.

    Note

    From here on, we will refer to this as your MinecraftMod folder.

  4. Double-click into the MinecraftMod folder and again, right-click in the main window and choose New ‣ Folder. Give this one the name CanaryMod.

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.

  1. Visit the TortoiseGit download page. Select the appropriate version based on your system type and download it.
  2. Once the file has downloaded, run it. You can leave all the installer options at their defaults. Allow it to install.
  3. Visit the git for windows download page. Click on the Download link.
  4. Once the file has downloaded, run it. You can leave all the installer options at their defaults. Allow it to install.
  5. Now is a good time to reboot your PC.

CanaryMod Server

  1. Visit the CanaryMod download page.

  2. Right click on the link to the Jar file and save it within the MinecraftMod\CanaryMod folder.

  3. In the MinecraftMod\CanaryMod folder, create a new file named startserver.bat, and give it the following contents:

    CanaryMod-1.7.10-1.1.2.jar
    pause
    
  4. In the MinecraftMod\CanaryMod folder, create a new file named eula.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.

  1. Visit the GitHub page for the CanaryRaspberryJuice plugin.
  2. 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.
  3. Using Windows Explorer, navigate to your MinecraftMod folder.
  4. Right-click within the main panel and choose Git Clone....
  5. 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.
  6. After the Clone process finishes, open the MinecraftMod\CanaryRaspberryJuice\jars folder. Copy the file named canaryraspberryjuice-1.3.jar into MinecraftMod\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

  1. Visit the Minecraft download page.

  2. Right click on the Minecraft.exe and save it into your MinecraftMod folder.

  3. 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.

  4. Give Minecraft a test run by opening the MinecraftMod folder in Windows Explorer. Then double-click on Minecraft.exe.

  5. 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).

    1. Click New Profile.

    2. 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

  1. Visit the Python Downloads page for Windows.
  2. Be sure to locate the 2.7.8 version of Python, and then select the right installer based on your system type.
  3. 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.

  1. Visit the GitHub page for the CoderDojoTC python-minecraft repository.
  2. 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.
  3. Using Windows Explorer, navigate to your MinecraftMod folder.
  4. Right-click within the main panel and choose Git Clone....
  5. 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.

  1. Shut down the Minecraft game, if it is running. Shut down the CanaryMod server, if it is running.
  2. Start the CanaryMod server by double-clicking on the startserver.bat script you created in the MinecraftMod\CanaryMod folder.
  3. Start Minecraft by opening the MinecraftMod folder in Windows Explorer. Then double-click on Minecraft.exe.
  4. Once the Minecraft Launcher opens, choose the MinecraftMod 1.7.10 Profile, and click Play.
  5. 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.
  6. Once your player has joined the game, from the Windows desktop, choose Start ‣ All Programs ‣ Python 2.7 ‣ IDLE (Python GUI) to open a Python Shell.
  7. In the Python Shell, choose File ‣ Open... and navigate to the MinecraftMod\python-minecraft folder. Choose hello_world.py.
  8. Choose Run ‣ Run Module, 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!