Minecraft: Pi Edition is a version of Minecraft developed for the Raspberry Pi. It is based on the already existing Pocket Edition but is slightly cut down, containing a revised feature set and support for multiple programming languages. The Pi Edition is intended as an educational tool for novice programmers. It is available to download for free, from the official downloads page and users are encouraged to open and change the game’s code using its API.
On http://www.stuffaboutcode.com/p/minecraft.html there are some very useful resources for starting programming with Pi Edition API