Minecraft Java Edition 26.3 · Pack Format 121.0

Cobble

A Python-like language that compiles to Minecraft Java Edition data packs.

0.10.0 stable · Minecraft Java Edition 26.3

Readable sourceIndentation, functions, imports, and thin helper APIs.
Real data packsFunctions, pack metadata, tags, predicates, dialogs, and JSON.
Validation pathGenerated commands can be checked against Minecraft's command tree.
Browser exportDownload generated files or a data pack ZIP from `/try`.

Examples

Write data pack logic directly

Cobble stays close to Minecraft output while removing repetitive function and resource boilerplate.

Load Events
from stdlib import event, text

def on_load():
    text.tellraw("@a", text.colored("Ready", "green"))

stdlib.addEventListener(event.LOAD, on_load)
Modern Items
def reward(player):
    /give {player} minecraft:diamond_sword[
        minecraft:custom_name={"text":"Cobble Blade"}
    ] 1
Data Pack Resources
from stdlib import datapack

datapack.function_tag("minecraft:load", ["demo:on_load"])
datapack.predicate("checks/always", {
    "type": "minecraft:random_chance",
    "chance": 1
})

In Browser

Try the compiler when you are ready to inspect output.

The Rust parser and transpiler run through WebAssembly. The compiler view shows functions, resources, metadata, diagnostics, and ZIP output.

Go to /try