Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

Data resources ​

Predicates, loot tables, advancements, recipes and item modifiers are JSON files. dp.<kind>(name, def) writes one and returns a handle you pass around instead of an id.

RegistrarBuildsReturns
dp.predicate(name, def)a predicatePredicateRef
dp.lootTable(name, def)a loot tableLootTableRef
dp.advancement(name, def)an advancementAdvancement
dp.recipe(name, def)a recipeRecipeRef
dp.itemModifier(name, def)an item modifierItemModifierRef
dp.biome(name, def)a biome-

A namespaced name like "minecraft:plains" overrides that vanilla file.

Write raw JSON ​

dp.registryFile(folder, name, json) takes JSON the builders don't model yet.

Validate output ​

validateDatapack(dp) checks every JSON file against the vanilla schema for the target version.

See also ​

Released under the MIT License · Credits
These docs were written with AI; the layout and every page have been reviewed by a human.