Chapter 2Information 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.
- 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)
- Open up the options.txt file in a text editor(img)
- Search for a line that reads: `pauseonLostFocus:False`, and change it to read `pauseonLostFocus:True` (img)
- Save and close options.txt
- 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.
- Start McMyAdmin and your CraftBukkit server
- Start a Minecraft game linked to your local McMyAdmin server
- Open up Scratch, and enable the experimental plugin
- Launch IDLE, and from the File menu select ‘Open’.
- Navigate to the mcpi-scratch.py file in your mcpi-scratch folder.
- 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.
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.
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.