Geek Gran interacts with Minecraft at last!

Over the last few months I’ve been trying to use Python with Minecraft and not succeeding until today.

Interact_with_Python

It was made easier when I bought a microSD card for the Pi Zero. The software is up-to-date so that really helps.  With an SD card adapter, I could put the microSD card into our Raspberry Pi model B and I thought I was home and dry.

I am following Carrie Anne Philbin’s instructions in her book ‘Adventures in Raspberry Pi’ or you can look at her Geek Gurl Minecraft video.  I just couldn’t get it to work and then read somewhere that you can only use Python2 with Minecraft.  That was the answer!  I followed her instructions and although when I put cd api/python into LXTerminal it wasn’t happy, when I followed the rest of the instructions my message appeared on the Minecraft game window, so I’ve cracked the interaction part.

By the way, I opened Python2 and used Idle, as a text editor, rather than the editor which she uses in her book.  Also, it seems to be important to use a capital letter in ‘Minecraft’ in line 2 of the code but I don’t know why.  One useful thing I found was that if I opened my previous Python3 attempts in Python2 they worked, consequently my failures were of some use after all.  So that’s as far as I’ve got, but presumably coding other features with Minecraft should be easy now that I’ve learnt to interact with mc!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s