100 Top Tips: Microsoft Excel
Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.
23 September 2014
The Raspberry Pi Foundation updated the Raspbian software the week before last. The good news is that Minecraft is now preinstalled in Raspbian, so you can start playing it, and more importantly programming it in Python, straight away.
However, it installs into a new location, so you might need to update any programs you've written so they can find the Minecraft Raspberry Pi API. Here's the code you need to get Minecraft working again:
import sys
sys.path.append("/opt/minecraft-pi/api/python/mcpi")
import minecraft
mc = minecraft.Minecraft.create()
mc.postToChat("Welcome to Minecraft!")
The important line is the second one - the API is now found at this location. The rest of this code posts a message to Minecraft to show it's working.
If you're a Minecraft fan, try out my Minecraft Maze Maker program!
Permanent link for this post | Blog Home | Website Home | Email feedback
© Sean McManus. All rights reserved.
Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!
Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.
This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.
Code a space adventure game in this Python programming book published by No Starch Press.
Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!
Set up your Raspberry Pi, then learn how to use the Linux command line, Scratch, Python, Sonic Pi, Minecraft and electronics projects with it.
In this entertaining techno-thriller, Sean McManus takes a slice through the music industry: from the boardroom to the stage; from the studio to the record fair.