Sneak peek – some more Minecraft: Pi Edition video
As you’ll know (unless you’ve been hiding under a rock, or very busy wrapping presents), we’re expecting to see the release of Minecraft: Pi Edition from Mojang very soon. Daniel Bates, a PhD candidate at the University of Cambridge and the Raspberry Pi Foundation’s Undercover Minecraft Operative, has put together a video demo of how you’ll be able to use code within the Minecraft environment, programming the world to make building faster and easier.
Daniel says:
Note that this is a very early pre-release version, and it is subject to change before release. I’ll show off more features including interactive stuff in future videos.
Source code:
http://www.cl.cam.ac.uk/~db434/files/minecraft.py
http://www.cl.cam.ac.uk/~db434/files/setblockdemo.pyFAQ:
Q. Can I use X programming language?
A. Any language capable of communicating over the network will work. See the first source file as an example of what’s needed.Q. When is it coming out?
A. No date has been confirmed yet.Q. How much will it cost?
A. Nothing.Q. Will it run on a 256MB Raspberry Pi?
A. Yes – this demo was filmed on an older model, and didn’t use any overclocking.
49 comments
Joe Lee-Mills
Amazing!
tzj
Would you be able to get to put spectator cameras in the world, so you can allow people to make movies, like what half-life mods (or any other for that matter) use to make theirs… would be cool to see kids being able to do action shots in mine craft! :D
tzj
Oh and would there be control blocks?
Daniel Bates
You will be able to use a player as a camera (I’m not sure if that’s how the other spectator cameras work) – you can set the player’s position and what they’re looking at.
There are no control blocks at the moment
STrRedWolf
Any more specs on the MC Pi Ed interface? That looks easy to do and I’ll start up a Perl module for it.
David
I am very curious to hear if they will be able to increase the world size that the pocket editions are currently stuck with. Minecraft lan party anyone?
Adrian Brightmoore
I have a bunch of MCEdit filters that build things (Mobius strip, gordian knot, shells etc) which you are welcome to use in showcases. It’s Python.
See Reddit submissions
qwerty
Do you need to have your Raspberry Pi connected to the Internet to use this?
Daniel Bates
Nope – I have never connected this Pi to the network.
qwerty
Thanks for the reply, I needed to know, NOW I’M EXCITED ABOUT THE RELEASE OF THIS A LOT!
Texy
Pi release has been delayed until the new year, rumour has it :-/
https://mobile.twitter.com/danfrisk/status/282545396201422848
liz
Once Friday had passed, I suspected that might be the case – because I’m sure the guys at Mojang need a Christmas break just as much as we do!
Texy
As indeed we all do ;-)
I’m thinking how little I would be doing on the pi if it had been ready now, so maybe it’s a Good Thing.
T.
toxibunny
that. is. awesome.
Dylan
Interesting thing I saw a couple days ago- when I googled “minecraft pi edition” one of the results was “Minecraft Pi edition available for download”, from mojang.com, so I clicked on it and it gave me a 404. DREAMS CRUSHED
George
That’s because they ‘accidentally’ posted an early build on their blog. You can find a link floating around. It has a fairly complete API, but somethings aren’t complete.
qwerty
I saw that too, when I googled it…
qwerty
Anyone think I should port this to Python 3? I could also add more colours.
qwerty
I meant more colors for both…
Stimbus
I get an error:
File “minefracft.py”, line 7
_sock.connect((ip,port))
^
IndentationError; unexpected
Tom
same please help us!
qwerty
Run LXTerminal, use the “cd” command to get to the directory the file is in.
Then, type “python”. Once that has come up in LXTerminal, type “import minecraft as mc”.
qwerty
1. Will there be a multiplayer?
2. Can we connect to another Pi and control that?
Daniel Bates
Yes and yes.
qwerty
Thanks for the reply, but I have yet another question (sorry…) what kind of multiplayer, like online or lan?
Daniel Bates
LAN, though there are programs available which can tunnel LAN connections over the internet.
qwerty
Thanks.
Could VPN work?
George
My big question is will it be opensource, or at least support mods. I really want to use this to build a programming tutorial, and I want to build the lessons in as events in the game.
Daniel Bates
The game itself will be closed source, but all of the API stuff will be.
There won’t be official mod support, but the API should be pretty capable.
mooodin
Hi George..
Started python via Terminal as you suggested.. unfortunately the indent error remains..:-(
——snip—————-
pi@raspberrypi ~/mcpi $ python
Python 2.7.3rc2 (default, May 6 2012, 20:02:25)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import minecraft as mc
Traceback (most recent call last):
File “”, line 1, in
File “minecraft.py”, line 7
_sock.connect((ip,port))
—————-snap———
I tried some “trial and error” indent changes without luck
qwerty
Wasn’t it me that told you…
Try downloading the file again and run it from LXTerminal.
Jeff
Hello, I managed to fix the indentation errors (about 5-6 of them?),
and definded port and ip as what is specified by connect()’s definition.
Then, it has the errno “111” connection refused/something like that.
I tried the “import minecraft as mc” trick after navigating to minecraft.py’s location to no avail, having the same error.
Jeff
Defined*, oops.
davedude0
I assume (and hope) that it will be available on the Pi store? And dlc like texture packs and mods (if it IS open source and moddable) would work well as something similar to the gmod dlc pages, but I’m sure people would cope with an apt style code based database!
Can’t wait for the full release!
liz
It’s totally up to Mojang how they decide to distribute it – but I hope it’ll be available in the Pi store too!
Shawn Carolan
Does the wire protocol work for other minecraft servers as well besides Raspberry Pi? I’m playing around with it on Mac OSX and can connect to the minecraft port:
telnet 127.0.0.1 50338
but as soon as I send the string:
set-block(0,0,0,2)
the server hangs up on me. Is this protocol specific to the Pi minecraft server? If so, any guidance on libraries available to talk to other servers? I did find the server wire protocol in the Minecraft wiki but it’s not as elegant as this!
Daniel Bates
The protocol is specific to the Raspberry Pi version, but it is possible to add the same functionality to the normal game using mods. I think there are people working on that at the moment.
Rory Kinghan
Can you get survival mode on Minecraft PI edition?
qwerty
Not at the minute, but I hope there is Survival, Crafting, redstone and pistons soon. I know someone on minecraftforums has made a mod so mobs can spawn.
Lorcan O’Brien
Where is the download I would love to mod this :D
Or is it even released yet?
qwerty
Theres a pre-release download, search google for “minecraft pi gameplay and download”
There should be a few results. If you need help with the API, just ask.
qwerty
Can I write my own API for MCPI?
Daniel Bates
You can build your own API on top of the one provided, but the game is only programmed to understand a limited set of commands. There is quite a lot more available than I’ve shown so far, though.
qwerty
Thanks, going to simplify it a little bit so I can remember it all…
Wafflemaster
How do i get python to interact with minecraft pi? I have done
import minecraft as mc but i dont know what to do next? Help please!!!!
Daniel Bates
Assuming you have Minecraft running, you can use
mc.connect()
to set up a connection for sending commands, and then usemc.setblock(x,y,z,type)
to build stuff.If you have the game already, though, it likely came with a much more fully-featured codebase from Mojang. Look in the api folder.
bob
you should upload it to the pistore!
coolguy96
Wow really cool cant wait till i get it thx you should teach us how to program it!
Leestons
I type mc.connect() and I just get an error, any help?
>>> import minecraft as mc
>>> mc.connect()
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'connect'
Comments are closed