Build Minecraft Datapacks
with Modern Code

MobCode is a powerful programming language designed to compile into Minecraft function files. Write clean, modular code with namespaces, classes, functions, and macros.

Powerful Features

Everything you need to create sophisticated Minecraft datapacks with modern programming concepts

Namespaces & Classes
Organize your code with proper namespaces and class structures for better maintainability
Functions & Macros
Create reusable functions and powerful macros for efficient and modular scripting
Direct Compilation
Compile directly to Minecraft function files
Modern Syntax
Clean, readable syntax that makes datapack development intuitive and enjoyable
Rich Examples
Comprehensive examples and documentation to get you started quickly
Open Source
Completely open source and community-driven development on GitHub

See MobCode in Action

Clean, intuitive syntax that compiles to efficient Minecraft function files

MobCode example
namespace example
{
    class exampleclass
    {
        function testfunction
        {
            tellraw @a "hello, world!";
        }
    }

    function classless
    {
        Item.Give(@a,minecraft:stick,10);
    }
}
namespace example
{
    function calculate
    {
        $number = 10 * 2 - 5;
        say $number$;
    }

    function if
    {
        $cond = {"a":5,"b":3};

        if $cond.a$ > $cond.b$
        {
            say true;
        }
    }

    function times
    {
        $repeat = 3;

        times $repeat$
        {
            say repeated;
        }
    }

    function while
    {
        $countdown = 10;

        while $countdown$ > 0
        {
            $countdown = $countdown$ - 1;
            say repeated;
        }
    }
}
namespace example
{
    @load
    function load
    {
        say load;
    }

    @tick
    function tick
    {
        playsound minecraft:entity.arrow.hit_player voice @a;
    }
}

Ready to Get Started?

Join the community and start building amazing Minecraft datapacks with MobCode today