Conway's 'Life' in Minecraft via MCEdit, Raspberry Juice API, and Bukkit

Post date: Jun 23, 2013 5:16:52 AM

I was compelled to take a look at interactive world manipulation in Minecraft using the Raspberry PI API (or rather, the port called Raspberry Juice that Martin O'Hanlon has been using recently for his programs). I used MCEdit as a harness for this because the seed image of the Life game is basically a selection of blocks that need to be updated, making MCEdit appropriate to create those blocks.

'Life' simulates a cellular automation that follows simple rules on each iteration of the world - if a block is alive and is surrounded by 2 or 3 alive blocks, it will stay alive next turn. If there are more or less blocks around it, it will die next turn due to loneliness or overcrowding. If there is a dead cell surrounded by three other alive cells, it will be re-born on the next turn. In this implementation I have wrapped the map so blocks moving off one edge rejoin at the other.

There have been some impressive Life mods for Minecraft in the past, including 3D variants. This implementation is a proof of concept to flush out issues with the Raspberry API as a tool for more interesting things.

How to use it

How it works

The Pi API is dreadfully slow for reading the world blocks. As a result the filter writes to the world instead, with all the game calculation in the MCEdit memory. The Minecraft world is being used as a canvas. If you break blocks they will be re-created by the MCEdit filter on the next iteration.


This was a proof of concept. What I take away is: