Cobble
Cobble is a Python-like language that compiles to Minecraft Java Edition data
packs. You write functions, events, conditions, loops, and resources in .cbl
files, and the compiler turns them into .mcfunction files, function tags, and
JSON resources.
from stdlib import event
def on_load():
/tellraw @a {"text":"Cobble loaded","color":"green"}
def reward(player, amount):
/give {player} minecraft:diamond {amount}
stdlib.addEventListener(event.LOAD, on_load)
Cobble targets Minecraft Java Edition 26.3 (pack format 121.0). The current
crates.io release is 0.10.0. This is the nightly documentation, built from the
main branch, where 0.11 is in development. What it says about 0.11, such as
the per-pack <namespace>.vars objective and persist variables, may change
before the release.
Where To Start
- Installation and Your First Pack set up a project and load it in a world.
- The Language Guide covers the syntax chapter by chapter.
- The Standard Library lists the built-in helpers and resource declarations.
- The CLI reference documents every command.
You can also try Cobble without installing anything in the browser compiler.
Links
- Source and issues: github.com/deveworld/cobble
- Rust library API: docs.rs/cobble-lang
- Changelog and roadmap