PDA

View Full Version : Playing with the Minecraft API and a Raspberry Pi



wraggster
February 16th, 2013, 21:25
http://hackadaycom.files.wordpress.com/2013/02/mine.jpg?w=580&h=325
It hasn’t been a week since Minecraft for the Raspberry Pi has been released, and already we’re seeing some cool builds that bridge our analog world with Minecraft voxel land. [Martin] got his hands on the Raspi version of Minecraft and decided to take advantage of the API Mojang threw into the build by making a huge analog block clock (http://www.stuffaboutcode.com/2013/02/raspberry-pi-minecraft-analogue-clock.html) that keeps real world time in the Minecraft universe.
Basically, [Martin] created a small Python script that draws the face and hands of a clock in a Minecraft world. The Minecraft API comes with neat functions such as drawCircle, and drawLine, so making a real clock face is as simple as getting the system time and doing a bit of trig.
After the break you can check out [Martin]‘s Minecraft clock in action. If you’re running the Pi version of Minecraft, you can also get this running on your machine with the code on [Martin]‘s git (https://github.com/martinohanlon/minecraft-clock).

http://hackaday.com/2013/02/16/playing-with-the-minecraft-api-and-a-raspberry-pi/