Community Projects / Examples

All of the examples below require the mcpi (and some the minecraftstuff) libraries, which are available in this repository.

TeachCraft Lessons

Free lessons that introduce new programmers to the mcpi api, and jumpstart them on building superpowers using python to PVP with in a multiplayer world.

Book: Adventures in Minecraft

A fantastic textbook that introduces students to programming minecraft + python. Covers a wide variety of minigames, tying the physical world to minecraft, and skillfully builds up a student's confidence to tackle more and more complex projects. Teachcraft is unaffiliated with the book, we are just huge fans and highly recommend it.

Pyramid Algorithm

Demonstration of creating a structure algorithmically, using mcpi library and setblocks.

Minecraft Superpowers (granted with Python)

Demonstration of granting your character superpowers, which you invoke in-game via right clicking with a sword, shooting an arrow at a location, or typing into chat.

Pixel Art - Import image into Minecraft

Take any image on your machine and render it in a minecraft world. Requires installation of pillow (Python Imaging Library). Sample image here.

Import 3D Model into Minecraft

Render a 3D Model in your Minecraft world. Sample models: farmhouse, shuttle, skyscraper. Adjust this value to alter which example object to use.

Drawing

Instead of operating at the block level, use this library to draw lines, circles, spheres, and faces.

Shapes

Define a shape using x/y/z coordinates, and then move that shape of blocks around.

Shape Rotation

Define a shape using x/y/z coordinates, then rotate that shape of blocks.

Circle

Using a turtle, build a circle.

Squares

Using a turtle, build squares.

Spiral

Using a turtle, build a spiral.

Pattern

Using a turtle, build a pattern.

Fractal Tree

Using a turtle, build a fractal tree.

3D Fractal Tree

Using a turtle, build a 3d fractal tree.

3D Fractal Tree Colors

Using a turtle, build a 3d fractal tree in colors.

3D Nautilus

Using a turtle, build a 3D Nautilus.

Api Tutorial

Intro tutorial to the mcpi api.

Api Basics

Basic rundown of the mcpi api.

Minigame: Hide and Seek

A python powered game of hide and seek! The concept is really simple, a diamond block is hidden, at a random location, in the minecraft world and you have to find it and stand next to it and its quickest time wins.

Auto Bridge

How about if you could wander around the Minecraft world and never fall off a cliff or have to swim across an ocean. What if, no matter where you walked a bridge automatically appeared under your feet... Well with Minecraft Pi edition, its API and a small python program, you can have just that! Note: Works great on raspberry pi, may lag on a RaspberryJuice server.

Analogue Clock

Using the MinecraftStuff library to draw shapes, build a huge clock powered by python!

Minigame: Snake

Play the classic game of snake in minecraft, powered by python!

Import 3D model of Manhattan into Minecraft!

Seriously, import Manhattan into your MC world. Note that it may require the bundled version of the minecraft library (rather the the mcpi that most of these examples use).

Planetary Gravity Simulator

A whole solar system simulated in minecraft

Cannon

A fully working cannon, lets blow stuff up!

Teleport

Teleport the player

Flower Path

Make a flower path follow the player around

Warehouse

Build a warehouse

Chat

Interact with MC chat

Freeze

Make water freeze as you walk on it. Note: Works great on raspberry pi, may lag on a RaspberryJuice server.

Minigame: Blockfighter

Hit blocks, and keep score. Note: this example uses the function "mc.events.pollBlockHits()". In the TeachCraft version of mcpi, this function is renamed to "mc.player.pollBlockHits()"

Flying with your brain

Use a Mindflex EEG and python to control your character in minecraft directly with your brain