Learn to program Python within a multiplayer world we all know and love, Minecraft!
Code yourself superpowers, build algorithms to construct large buildings or cities, even make a competitive PVP environment pitting your code-magic skills against your friends! Make learning to code fun!

Get Started - For Individuals Get Started - For Educators

(Disclaimer: TeachCraft is not associated with Mojang/Minecraft)

Craft magic spells with Python code!

With only a few lines of code, grant yourself the magical power to teleport wherever you shoot your arrow.

Make your spells dynamic - by typing in a new spell name in chat, cause different python code to be active!

Observe this example, which grants your bow/arrow the power to teleport, or explode into a pool of lava, and is toggled by you typing the name of the spell in Minecraft chat!

import mcpi.minecraft as minecraft
import time

mc = minecraft.Minecraft.create(address="", name="stevetest")

active_spell = "teleport"

while True:

    for blockhit in mc.player.pollProjectileHits():
        if active_spell == "teleport":
            mc.player.setPos(blockhit.pos.x, blockhit.pos.y, blockhit.pos.z)
        elif active_spell == "lavapool":
            lava_block_id = 10
            mc.setBlocks(blockhit.pos.x+4, blockhit.pos.y-1, blockhit.pos.z+4,
                         blockhit.pos.x-4, blockhit.pos.y-1, blockhit.pos.z-4,

    for chatpost in mc.player.pollChatPosts():
        if chatpost.message.lower() == "lavapool":
            active_spell = "lavapool"
        elif chatpost.message.lower() == "teleport":
            active_spell = "teleport"


Join Our Community

Nine free lessons to get you started (whether individually, or for a class)

One awesome textbook with numerous walkthroughs and projects.

A TON of open source community projects, to give you inspiration or starting bases for your own designs!