Chapter 2

Information on how to link up Scratch and Minecraft!

Stop Minecraft Screen from Pausing

It can be really frustrating if you want to switch back and forth between Scratch, Python and Minecraft, as Minecraft will automatically pause. While this is good when you’re playing normally, it stops us from seeing what’s happening in the Minecraft window when we’re working elsewhere. Follow these instructions to stop Minecraft from pausing.

  1. Navigate on your computer to your Minecraft folder. Remember that you can always find out where that is by opening up the Minecraft Launcher and clicking on ‘Edit Profile’.(img)
  2. Open up the options.txt file in a text editor(img)
  3. Search for a line that reads: `pauseonLostFocus:False`, and change it to read `pauseonLostFocus:True` (img)
  4. Save and close options.txt
  5. Open Minecraft back up. Now you’ll find that when you ALT-TAB (Win) or CMD-TAB (Mac) away from Minecraft to another program, Minecraft won’t pause on you.

The Order of Things

You need to start your programs up in the correct order so that they will work properly.

  1. Start McMyAdmin and your CraftBukkit server
  2. Start a Minecraft game linked to your local McMyAdmin server
  3. Open up Scratch, and enable the experimental plugin
  4. Launch IDLE, and from the File menu select ‘Open’.
  5. Navigate to the mcpi-scratch.py file in your mcpi-scratch folder.
  6. Select ‘Run Module’ from the Run menu in IDLE. A new window will open displaying the output of the Python program running. It is safe to minimise it and carry on.

You should now position your Scratch and Minecraft windows side-by-side to view everything that’s happening.

Home Automation

The Home Automation exercise teaches you how to define and use variables and how to automate shape creation in Minecraft. Click the button below to see the completed Scratch code from the exercise.

Home Automation File

Hello, Minecraft World!

In this exercise, you’ll learn about changing variable values on the fly, creating modular blocks of reusable code and how to make letters out of Minecraft blocks.

Click on the button below to download the finished code for Scratch 2.0.

 

Hello Minecraft World