Load Events
from stdlib import event, text
def on_load():
text.tellraw("@a", text.colored("Ready", "green"))
stdlib.addEventListener(event.LOAD, on_load)
Minecraft Java Edition 26.3 · Pack Format 121.0
A Python-like language that compiles to Minecraft Java Edition data packs.
0.10.0 stable · Minecraft Java Edition 26.3
Examples
Cobble stays close to Minecraft output while removing repetitive function and resource boilerplate.
from stdlib import event, text
def on_load():
text.tellraw("@a", text.colored("Ready", "green"))
stdlib.addEventListener(event.LOAD, on_load)def reward(player):
/give {player} minecraft:diamond_sword[
minecraft:custom_name={"text":"Cobble Blade"}
] 1from stdlib import datapack
datapack.function_tag("minecraft:load", ["demo:on_load"])
datapack.predicate("checks/always", {
"type": "minecraft:random_chance",
"chance": 1
})In Browser
The Rust parser and transpiler run through WebAssembly. The compiler view shows functions, resources, metadata, diagnostics, and ZIP output.