Playing With The Minecraft API And A Raspberry Pi

mine

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 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.

Continue reading “Playing With The Minecraft API And A Raspberry Pi”

Minecraft For RPi Released

Minecraft for RPi

Mojang, the folks behind Minecraft, have officially released Minecraft: Pi Edition. This free version of the popular game is optimized to run on the Raspberry Pi hardware, and has an API that exposes the game’s internals to a variety of programming languages.

Mojang intends this release to be an educational tool for teaching and learning programming. Since the API provides instant feedback in the game, it could be an interesting way to make learning to code fun for people of all ages.

Having access to the API on a RPi also means that the game can be connected to the real world. For example, using Python and the RPi.GPIO, pins on the GPIO header can be used for output or input. This creates a slew of possible hacks that interface with the game.

Any ideas on what you’d like to do with Minecraft on a RPi? Let us know in the comments. Also, we coincidentally just printed a minecraft pick on our 3d printer. There’s a time lapse video of it after the break!

Continue reading “Minecraft For RPi Released”

Controlling A Raspberry Pi With Real Life Redstone

minepi

We’ve seen computers built in Minecraft out of redstone, the game’s version of electricity, circuits, and digital logic. We’ve even seen a few redstone contraptions controlling real-world devices. [Angus]’ build, though, takes things to a whole new level. He’s created a bridge between Minecraft circuits and their real life counterparts using a Raspberry Pi.

[Angus]’ build relies on a mod for Minecraft servers running as a Bukkit plugin. Blocks powered by redstone are labeled with an in-game sign, and messages regarding the state of a block are passed over the network using the MQTT protocol.

The hardware side of the build is a Raspberry Pi with a PiFace expansion board. With this setup, [Angus] can control LEDs on the PiFace by toggling Minecraft levers, or light up redstone lamps using the PiFace’s buttons.

If you’d like to try this out for yourself, you can grab the Bukkit plugin over on [Angus]’s git. Check out the video of the real life redstone in action after the break.

Continue reading “Controlling A Raspberry Pi With Real Life Redstone”

Minecraft Clock Radio Puts A Creeper Head Next To Your Bed

minecraft-alarm-clock

This clock radio plays tunes from Minecraft and it’s decorated to look just like a creeper head. In the game mob heads are available as decoration and [Young_Maker] liked to spice up his virtual bedside table with a creeper head. But we think it looks just as good in its physical form.

The main part of the clock is an Arduino with a character LCD screen. A DS1307 real-time clock makes sure the device is accurate. We called this a clock radio in the title of the post, but it’s more of a clock MP3 player. The uMp3 board is used to play random music from the game. We would categorize the soundtrack as minimalism, which is a reasonable way to gently wake in the morning. But if time runs out the boom of an exploding creeper is played to make sure you’re not late for work.

We’ve embedded [Young_Maker’s] demo video after the jump.

Continue reading “Minecraft Clock Radio Puts A Creeper Head Next To Your Bed”

Minecraft Coming To Raspberry Pi

The folks over at the Raspberry Pi Foundation often gets asked “does it run Minecraft?” Mojang, the team behind the block building game, has announced that they will be releasing Minecraft: Pi Edition. This port will be based off the Pocket Edition of the game, but with a revised set of features.

So what does this have to do with hacking? Mojang has announced that the Pi Edition will have “support for multiple programming languages.” There aren’t too many details about what this support will entail, but it looks to be aimed at teaching programming by using the world of Minecraft.

Hopefully, it will be possible to interface with the RPi’s expansion header to allow external devices to get data and create objects in the Minecraft world. There’s a lot of potential for hacking and learning programming skills.

The best part? It will be a completely free download. We’re looking forward to the launch.

AVR Minecraft Server Lets You Toggle Pins From The Virtual World

Wanting to test his skills by building a webserver [Cnlohr] decided to also code a Minecraft server which allows him to toggle pins from inside the game. The rows of switches seen above give him direct access to the direction register and I/O pins of one port of the ATmega328.

The server hardware is shown in the image above. It’s hard to tell just from that image, but it’s actually a glass substrate which is [Cnlohr’s] specialty. He uses an ENC424J600 to handle the networking side of things. This chip costs almost twice as much as the microcontroller next to it. But even in single quantities the BOM came in at under $20 for the entire build.

In the video after the break [Cnlohr] and a friend demonstrate the ability for multiple users to log into the Minecraft world. The simulation is fairly bare-bones, but the ability to affect hardware from the game world is more exciting than just pushing 1s and 0s through some twisted pairs.

Continue reading “AVR Minecraft Server Lets You Toggle Pins From The Virtual World”

Building A 6502 In Minecraft

We’ll admit that we haven’t been following Minecraft like we used to; its been a while since we’ve seen something amazing in Minecraft, but [eloraam]’s 6502 emulator (part of her RedPower Minecraft mod) takes the cake.

The RedPower mod adds a lot of industrial technology to Minecraft. Pumps, solar panels, and pneumatic tubes to move blocks around are the staple of this mod, but with the addition of a fully emulated 6502 computer, Minecraft moves from an anachronistic medieval-themed steampunk aesthetic to a full-on machine age, mainframes everywhere style.

The heart of the 6502 portion of the RedPower mod are three craftable blocks; a CPU, a monitor, and a disk drive. All these blocks are connected together with ribbon cables and can interact with other blocks in the Minecraft universe. The CPU is an emulated 6502, with a few instructions borrowed from the 65816 and the addition of MUL and DIV. It’s possible to program this computer in assembly, but [eloraam] a Forth interpreter with the OS to make programming a little easier.

It’s been almost two years since we first saw the beginnings of a CPU made in Minecraft, but this mod takes everything to the next level. In actuality, this isn’t very different from the game [notch] is currently working on; both feature an emulated 80’s era computer that can do all your in-game bidding. We can’t imagine anything better to get us hooked on Minecraft again, and we’ve got to commend [eloraam] for some seriously awesome work.

After the break is a 23-minute tutorial on the functions of the RedPower CPU, as demonstrated by Minecraft aficionado [direwolf20].

Continue reading “Building A 6502 In Minecraft”