Appearance
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.
| Registrar | Builds | Returns |
|---|---|---|
dp.predicate(name, def) | a predicate | PredicateRef |
dp.lootTable(name, def) | a loot table | LootTableRef |
dp.advancement(name, def) | an advancement | Advancement |
dp.recipe(name, def) | a recipe | RecipeRef |
dp.itemModifier(name, def) | an item modifier | ItemModifierRef |
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.