Manic Digger is an open-source implementation of block-building games as made famous by Minecraft. Manic Digger aims to be a generic platform ontop of which you can create your own game-types and scenerios. Through server-side scripting, any type of block-building game should be possible.
Source code of Manic Digger (Version 2013-02-06). Supplied as a VS2008 project. Open either with Visual Studio or MonoDevelop. Any other IDE supporting the format should work as well.