Skip to content

Datapacks

MineDnD items, recipes, enchantments, requirement rules, achievements, titles, translations and world settings live in a normal Minecraft datapack inside the world, written as plain JSON files. This page is the complete reference of their format.

<world>/datapacks/<your_pack>/
├── pack.mcmeta
└── data/<namespace>/
    ├── items/             ← MineDnD items (any subfolders)
    │   └── weapons/flame_sword.json
    ├── recipe/            ← how players make them: crafting table or brewing stand
    │   └── weapons/flame_sword.json
    ├── enchantment/       ← custom enchantments (vanilla format)
    │   └── holy_strike.json
    ├── crafting_requirements/  ← ability scores needed to craft, brew, place or use things
    │   └── redstone_torch.json
    ├── tags/potion/       ← potion tags, for rules about groups of potions (optional)
    ├── advancement/       ← achievements, and the advancements that unlock recipes
    ├── title/             ← titles, unlocked by achievements
    └── lang/              ← translations, one file per language
        ├── en_us.json
        └── it_it.json

World settings go in data/minednd/settings.json (see World settings).

The Default Content datapack is a complete working example: datapacks/default-content (namespace dnd5e; everything in it is listed in Default content). Copy any file into your own pack as a starting point.

In the Default Content pack Shows
Flame Sword, Dagger of Venom, Ranger's Bow, Wizard's Staff Requirements on weapons; custom and vanilla enchantments; unbreakable
Ring of Strength, Amulet of Health, Tome of Clear Thought Off-hand stat bonuses; the tome (+2 INT) unlocks the staff (INT 13)
Boots of Elvenkind, Belt of Giant Strength, Shield of Faith, Cloak of Protection Bonuses by armor slot; dyed leather; vanilla attribute_modifiers
Holy Strike, Venom Strike, Fleetfoot Enchantments: damage, on-hit effect with a STR/DEX condition, attribute while worn
Sneak Attack, Stoneskin, Hellish Rebuke, Darkvision, Stormcaller Entity flags, protection, reacting when hit, effects every tick, weather conditions
Potions (Hill Giant Strength, Heroism, …) minecraft:potion_contents with custom effects, brewed in the brewing stand (minednd:brewing)
data/minecraft/tags/enchantment/ Making custom enchantments appear in enchanting tables, loot and trades
crafting_requirements/ Recipe id, item, item list and item tag targets; same scores for several actions; different scores per action; use-only (ender pearl); potions by tier (brewing/, with the potion tags in tags/potion/)

pack.mcmeta for Minecraft 26.3:

{ "pack": { "description": "My campaign", "min_format": 121, "max_format": 121 } }
Field Value
pack.description Text shown in the Data Packs screen and /datapack list: a string or a text component ({ "translate": … })
pack.min_format, pack.max_format The data pack formats it works with: 121 for Minecraft 26.3

Your first datapack

A complete pack, step by step: one item (a sword that slows what it hits), its names in two languages, a recipe that unlocks when you pick up the ingredient, and a rule that asks for Strength to craft it. Every file is plain JSON; copy them as they are, then change them. The finished pack is also in datapacks/example in the repository.

<world>/datapacks/my_campaign/
├── pack.mcmeta
└── data/my_campaign/
    ├── items/weapons/frost_blade.json
    ├── lang/en_us.json
    ├── lang/it_it.json
    ├── recipe/weapons/frost_blade.json
    ├── advancement/recipes/weapons/frost_blade.json
    └── crafting_requirements/frost_blade.json

1. The pack. Make the folder my_campaign in the world's datapacks folder (where it is: The Default Content datapack), with pack.mcmeta:

{ "pack": { "description": "My campaign", "min_format": 121, "max_format": 121 } }

2. The item, data/my_campaign/items/weapons/frost_blade.json. Its id is the path: my_campaign:weapons/frost_blade.

{
  "category": "weapons",
  "stack": {
    "id": "minecraft:iron_sword",
    "count": 1,
    "components": {
      "minecraft:item_name": { "translate": "item.my_campaign.frost_blade", "fallback": "Frost Blade" },
      "minecraft:lore": [
        { "translate": "item.my_campaign.frost_blade.lore", "fallback": "Cold to the touch", "italic": true, "color": "gray" }
      ],
      "minecraft:rarity": "rare",
      "minednd:stat_bonus": { "bonuses": { "str": 1 }, "slot": "mainhand" },
      "minednd:requirements": { "str": 12 },
      "minednd:active_ability": {
        "type": "imbue",
        "name": { "translate": "ability.my_campaign.frost_strike", "fallback": "Frost Strike" },
        "right_click": false,
        "duration": 10,
        "damage": 2,
        "cooldown": 300,
        "effects": [{ "id": "minecraft:slowness", "level": 2, "seconds": 5 }]
      }
    }
  }
}

An iron sword with a name and lore, +1 STR while held, its powers off below STR 12, and an ability on the V key: the next hit within 10 seconds deals 2 more damage and slows the target. Every part is explained below (Items, Stat bonuses, Item requirements, Item abilities).

3. The names, data/my_campaign/lang/en_us.json and data/my_campaign/lang/it_it.json:

{
  "item.my_campaign.frost_blade": "Frost Blade",
  "item.my_campaign.frost_blade.lore": "Cold to the touch",
  "ability.my_campaign.frost_strike": "Frost Strike"
}
{
  "item.my_campaign.frost_blade": "Lama del Gelo",
  "item.my_campaign.frost_blade.lore": "Fredda al tatto",
  "ability.my_campaign.frost_strike": "Colpo gelido"
}

4. The recipe, data/my_campaign/recipe/weapons/frost_blade.json: an iron sword with four blue ice around it.

{
  "type": "minednd:crafting_shaped",
  "category": "equipment",
  "pattern": [" I ", "ISI", " I "],
  "key": { "I": "minecraft:blue_ice", "S": "minecraft:iron_sword" },
  "result": { "item": "my_campaign:weapons/frost_blade" }
}

5. When the recipe shows up, data/my_campaign/advancement/recipes/weapons/frost_blade.json: in the recipe book the first time the player holds blue ice (Unlocking recipes).

{
  "parent": "minecraft:recipes/root",
  "criteria": {
    "has_blue_ice": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [{ "items": "minecraft:blue_ice" }] } },
    "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { "recipes": "my_campaign:weapons/frost_blade" } }
  },
  "requirements": [["has_the_recipe", "has_blue_ice"]],
  "rewards": { "recipes": ["my_campaign:weapons/frost_blade"] }
}

6. Who can craft it, data/my_campaign/crafting_requirements/frost_blade.json: STR 12 (Requirement rules).

{ "recipes": ["my_campaign:weapons/frost_blade"], "requirements": { "str": 12 } }

7. Try it. In the world (with commands allowed): /reload, then

  • /dnd info: file/my_campaign is listed with 1 item, 1 rule and 1 recipe;
  • /dnd give @s my_campaign:weapons/frost_blade: the sword, with its tooltip;
  • /dnd stats set @s str 12: its powers wake up (the tooltip turns green); hit a mob after pressing V.

Something missing? See Finding mistakes.

JSON essentials

  • Your namespace: the folder under data/ (my_campaign above). Lowercase letters, digits, _, - and .. Use your own, never minednd, dnd5e or minecraft (unless you mean to replace their files, see Load order and overriding).
  • Whose namespace is whose: minednd is the engine's (only the world settings and the hook tags #minednd:first_time_xp and #minednd:fletching_table are files there); dnd5e is the Default Content's, which is just one datapack like yours.
  • Ids come from paths: data/<namespace>/items/weapons/frost_blade.json is the item <namespace>:weapons/frost_blade; the same for recipes, rules, advancements and titles in their folders.
  • Minecraft ids are minecraft:iron_sword, minecraft:speed, …; tags start with #: #minecraft:planks. The F3 + H tooltips in game show item ids.
  • Plain JSON: double quotes around keys and texts, commas between entries but not after the last one, no comments, UTF-8. A text editor that checks JSON (VS Code, or any online JSON validator) catches most mistakes.
  • Texts are text components: "Frost Blade", { "text": "Frost Blade", "color": "aqua" }, or { "translate": "<key>", "fallback": "<English>" } for a text in each player's language (Translations).
  • Optional fields can be left out: they take the default written in each table below.

Every file type

Folder (under data/<namespace>/) What Reference
items/**/*.json MineDnD items Items, with the components stat bonus, requirements, ability
recipe/**/*.json Crafting recipes (minednd:crafting_shaped), brewing recipes (minednd:brewing), and any vanilla recipe Recipes, Brewing recipes
advancement/**/*.json Achievements (with MineDnD's triggers) and recipe unlocks Achievements, Unlocking recipes
enchantment/*.json Enchantments (vanilla format, plus the minednd:ability_scores condition) Enchantments
crafting_requirements/**/*.json Requirement rules: scores to craft, brew, place, use Requirement rules
loot_injections/**/*.json MineDnD items added to existing loot tables (vanilla chests, mobs, fishing…) Loot
loot_table/**/*.json Loot tables (vanilla format), which can use the minednd:catalog_item entry Loot
title/*.json Titles Titles
tags/<type>/*.json Groups of ids: potions, blocks, items, enchantments… Tags
lang/<language>.json Translations Translations
settings.json (only in data/minednd/) World settings World settings

How items look isn't in a datapack: it's a separate resource pack, see Custom looks.

Load order and overriding

A world's packs have an order. /dnd info lists them from the lowest to the highest priority; in the Data Packs screen the top of the Selected column wins.

When two packs have a file at the same path:

Files What happens
Items, recipes, requirement rules, enchantments, advancements, titles The highest pack's file is used, the others are ignored
Translations (lang/<language>.json) The highest pack's file is used as a whole: its keys replace the other file, they don't add to it
Tags (tags/…) Merged: the values of every pack add up, unless a file says "replace": true
data/minednd/settings.json Merged key by key: the highest pack wins for each value it sets (the Default Content pack sets every value, so a settings pack must be above it)

So: - To change a file of another pack (e.g. the Default Content), copy it into your pack at the same path (same namespace and folders) and put your pack above it. - Your own texts go in your namespace's lang files (data/my_campaign/lang/en_us.json): files of different namespaces are all loaded. Overriding data/dnd5e/lang/en_us.json would replace all of the pack's English texts. - Moving a pack up: /datapack disable "file/my_campaign" then /datapack enable "file/my_campaign" last (last = highest priority, first = lowest; before/after another pack work too). Or drag it in the Data Packs screen. - Taking something away can't be done by overriding (a file can only replace a file). Lift a rule by overriding it with score 1; for the rest, delete the file from your copy of the pack (Use only part of it).

Items

Files: data/<namespace>/items/**/*.json. Before 0.3.0 this folder was called gm_items: the mod still reads it (with a warning in the log); rename it to items.

The item id is the file path: data/my_campaign/items/weapons/flame_sword.json → my_campaign:weapons/flame_sword (used by /dnd give).

{
  "category": "weapons",
  "stack": {
    "id": "minecraft:iron_sword",
    "count": 1,
    "components": {
      "minecraft:item_name": { "translate": "item.my_campaign.flame_sword", "fallback": "Flame Sword" },
      "minecraft:lore": [
        { "translate": "item.my_campaign.flame_sword.lore", "fallback": "Forged in the Plane of Fire", "italic": true, "color": "gray" }
      ],
      "minecraft:rarity": "rare",
      "minecraft:enchantments": { "minecraft:fire_aspect": 2, "my_campaign:holy_strike": 1 }
    }
  }
}
Field Required Value
category no (default misc) Any text: groups items in the creative tab, in /dnd catalog list and in the Imbue tab's list. Its name there is the translation minednd.category.<category> (else the category itself). The Default Content pack uses weapons, armor, accessories, tomes, tools, potions, arrows, templates, food
stack yes The item, as a vanilla item stack:
stack.id yes The base item, a Minecraft item id (minecraft:iron_sword). It decides the model, base damage, durability and how it's used
stack.count no (default 1) 1–99: how many /dnd give and the recipes give (a recipe's own count multiplies it)
stack.components no Data components, "<component id>": <value>: any vanilla component (as in /give and loot tables) plus MineDnD's three: minednd:stat_bonus, minednd:requirements, minednd:active_ability
limit no 0 or more: how many can be made naturally in a world; see Limited items. Without it there's no limit
hidden no (default false) true: a secret item, shown only to operators and in creative mode; see Hidden items

Vanilla components often used on MineDnD items (their full formats are on the Minecraft Wiki's Data component format page):

Component Value For
minecraft:item_name text component The name (shown in the rarity colour, not italic)
minecraft:lore list of text components Lines under the name
minecraft:rarity common, uncommon, rare, epic Name colour
minecraft:enchantments { "<enchantment id>": <level> } Enchantments (vanilla or from a datapack)
minecraft:enchantment_glint_override true / false The enchanted shine without (or despite) enchantments
minecraft:attribute_modifiers list of { "type", "id", "amount", "operation", "slot" } Armor, damage, speed… always on, even below the requirements
minecraft:unbreakable {} Never loses durability (off below the requirements)
minecraft:dyed_color integer RGB, e.g. 3949738 Leather armor colour
minecraft:potion_contents { "potion": …, "custom_color": …, "custom_effects": [ { "id", "amplifier", "duration" } ] } Potions' effects (duration in ticks)
minecraft:max_stack_size 1–99 Stack size
minecraft:item_model a model id Another look (a resource pack can add models)
  • Names and lore: use { "translate": "<key>", "fallback": "<English text>" } so they appear in each player's language (see Translations). Plain text like "Flame Sword" also works, but is the same for everyone.
  • Prefer minecraft:item_name over minecraft:custom_name: it shows in the rarity color and isn't italic (custom_name looks like an anvil rename).
  • stack: a vanilla item stack, exactly like in /give or loot tables. Any vanilla component works: names, lore, enchantments, attribute_modifiers, unbreakable, dyed_color, item_model, ...
  • Every catalog item automatically gets minecraft:custom_data → minednd_catalog_id, so the mod can recognise it later.
  • A broken file is skipped and logged (Skipping item ... in the server log); the rest still loads.

Limited items

"limit": 3 (next to category) makes an item scarce: a world can make only 3, in all, by any player.

{ "category": "accessories", "limit": 3, "stack": { "id": "minecraft:emerald", "components": { … } } }
  • What uses up the limit: crafting, smithing, fletching and imbuing (counted when the result is taken, also with a shift-click), brewing (counted per bottle) and loot (never cooking: see Cooking recipes). When none are left, the crafting result stays empty with "Tinker's Charm: none left in this world" above the hotbar, and the brewing stand doesn't brew that bottle. With 1 left and 3 bottles in the stand, one is brewed and the others stay as they are.
  • Copies never come back: a copy lost in lava, despawned or used up still counts.
  • Operators can always make more with /dnd give; those copies are counted apart and don't use up the limit. Copies taken from the creative tab aren't counted.
  • "limit": 0: only operators can make it.
  • Limited items aren't put in /dnd catalog chests and the example world chests (anyone could take them there). Crafter blocks don't craft them: making them stays something a player does.
  • /dnd limited list shows each limited item with how many were made and how many operators gave.
  • The counts are saved with the world (data/minednd/limited_items.dat). Changing a limit and running /reload applies the new limit to the copies already made: lowering it below them just means none are left. An item removed from the pack keeps its count, in case it comes back.

Hidden items

"hidden": true (next to category) keeps an item secret. Players aren't told it exists until they find one:

  • It isn't in the MineDnD creative tab, the brewing stand's recipe list, /dnd catalog chests or the example world chests.
  • Its recipe isn't put in the recipe book: a crafting recipe without an unlock advancement normally is, from the start, but not a hidden item's. An unlock advancement the pack adds still shows it, like any other. The recipe works anyway for whoever puts the right ingredients in the grid or the brewing stand.
  • The game doesn't send it to players' clients at all (not even its id), nor the requirement rules that name it: a hidden item's tooltip doesn't list its rules ("To use: …"), though the server still applies them. Its own minednd:requirements still show.
  • Operators and players in creative mode see everything, hidden items included, at once after /op or /gamemode creative (and no longer after /deop or leaving creative mode). /dnd give and /dnd catalog list work as usual.
  • A player who finds one (in a chest, from another player) holds a normal item, with its name, lore and tooltip.
  • The content docs generated from the Default Content pack leave hidden items out.
  • hidden and limit are separate: an item can be hidden, limited, both or neither.

Arrows with effects

An arrow that poisons, slows or lifts what it hits is a MineDnD item built on minecraft:tipped_arrow, with the effects in minecraft:potion_contents, like a potion:

{
  "category": "arrows",
  "stack": {
    "id": "minecraft:tipped_arrow",
    "components": {
      "minecraft:item_name": { "translate": "item.my_campaign.venom_arrow", "fallback": "Venom Arrow" },
      "minecraft:potion_contents": {
        "custom_color": 5149489,
        "custom_effects": [
          { "id": "minecraft:poison", "amplifier": 1, "duration": 200 },
          { "id": "minecraft:slowness", "duration": 100 }
        ]
      },
      "minecraft:potion_duration_scale": 1
    }
  }
}
  • minecraft:potion_duration_scale: a tipped arrow gives only 1/8 of each effect's duration, as in vanilla. 1 gives the whole duration (in ticks: 200 = 10 seconds); 0.5 half of it.
  • Any bow or crossbow shoots it. Picked back up, it's still the same MineDnD item.
  • Make several at once with a recipe's result.count (e.g. 8 arrows around an ingredient) and unlock the recipe from that ingredient, like the Default Content's Venom, Frost and Banishing arrows.
  • Only tipped_arrow: a minecraft:spectral_arrow ignores potion_contents (it only makes targets glow). For an arrow that glows and does more, use a tipped arrow with minecraft:glowing among its effects.
  • What doesn't work on arrows:
  • enchantments: the game uses the bow's or crossbow's enchantments, not the arrow's;
  • minednd:requirements: they turn off an item's powers (enchantments, bonus, ability), and an arrow's effects aren't one of them, so they don't stop its effects;
  • extra damage, fire, knockback or lightning on hit: no component does it for arrows yet. The bow's imbue ability adds those to its next shots.
  • The Pack Editor warns about effects on a spectral arrow, and reminds you of the duration scale.

Food

Food is a MineDnD item built on a vanilla food, with its own minecraft:food (how much it fills) and, for timed buffs, minecraft:consumable with apply_effects:

{
  "category": "food",
  "stack": {
    "id": "minecraft:honey_bottle",
    "components": {
      "minecraft:item_name": { "translate": "item.my_campaign.dwarven_stout", "fallback": "Dwarven Stout" },
      "minecraft:lore": [
        { "translate": "potion.withDuration", "with": [{ "translate": "effect.minecraft.strength" }, "2:00"], "color": "blue", "italic": false }
      ],
      "minecraft:food": { "nutrition": 2, "saturation": 2.0, "can_always_eat": true },
      "minecraft:consumable": {
        "animation": "drink",
        "sound": "minecraft:entity.generic.drink",
        "on_consume_effects": [
          { "type": "minecraft:apply_effects", "effects": [{ "id": "minecraft:strength", "amplifier": 0, "duration": 2400 }] }
        ]
      }
    }
  }
}
Component Value
minecraft:food nutrition (hunger points, 2 = one drumstick), saturation, can_always_eat (eaten even when full: drinks, healing berries)
minecraft:consumable consume_seconds (default 1.6), animation (eat, drink), sound, has_consume_particles, on_consume_effects
on_consume_effects { "type": "minecraft:apply_effects", "effects": [ { "id", "amplifier", "duration" } ], "probability": 1.0 }: effects for duration ticks (2400 = 2 minutes; amplifier 0 = level I). Also minecraft:remove_effects, minecraft:clear_all_effects, minecraft:teleport_randomly, minecraft:play_sound
  • Pick the base for what it leaves behind: a stew (minecraft:mushroom_stew, rabbit_stew, beetroot_soup) leaves a bowl and stacks to 1; a minecraft:honey_bottle leaves a glass bottle and stacks to 16; bread, pie, meat and fruit leave nothing. Don't use a base that places a block when used (sweet berries, glow berries, carrots, potatoes).
  • minecraft:consumable replaces the base's, whole: the honey bottle's "cures poison" or the golden apple's effects are gone, and fields you leave out take their defaults (1.6 s, eating sound). Without effects you don't need it.
  • Players don't see effects on food: vanilla shows a potion's effects but not a food's. Write them in minecraft:lore, as above: potion.withDuration, potion.withAmplifier and effect.minecraft.<effect> are the game's own texts, so they're translated in every language.
  • Cook it from a raw MineDnD item with a cooking recipe; the Default Content's food shows each kind.

Custom looks (resource packs)

A datapack decides what an item does; how it looks comes from a resource pack, which every player's game loads. They're two separate packs: the datapack goes in the world's datapacks/ folder, the resource pack in the game's resourcepacks/ (or is sent by the server, see below). In 26.3 a resource pack's pack.mcmeta says format 97 (a datapack's is 121):

{ "pack": { "description": "My campaign: looks", "min_format": 97, "max_format": 97 } }

A MineDnD item always has a base item (stack.id): there's no item "of nothing". The base gives what components can't (a bow draws, a trident is thrown, a fishing rod casts); the look can be anything.

Linking the item to its look

Way In the item With the resource pack Without it
By its id (recommended) nothing: the resource pack has assets/<namespace>/items/<path>.json, named like the item (assets/my_campaign/items/elven_longbow.json for my_campaign:elven_longbow) your model the base item's normal look
A model of your own "minecraft:item_model": "my_campaign:elven_longbow" your model the black-and-purple "missing model" checkerboard (the item still works)
A vanilla model as a placeholder "minecraft:item_model": "minecraft:nether_star" — that vanilla look; no resource pack needed
  • By its id suits almost every item: players without the resource pack see the base item, and nothing vanilla is replaced, so several look packs (the Default Content's, yours, another author's) work together. MineDnD picks the file for each MineDnD item when a resource pack has it, with the file's own properties (e.g. swap_animation_scale).
  • item_model wins over the id: an item that sets it always uses that model. A model of your own looks broken without the pack: use it when the pack is sure to be there (a modpack, a server that requires it).
  • A vanilla placeholder is handy for a new object whose art isn't ready, or for a look that needs no art at all.
  • Vanilla's own way, minecraft:custom_model_data with a select in the base item's definition (assets/minecraft/items/bow.json), still works, but replaces the base item's file: two packs doing it for the same base item clash.

What goes in the resource pack

assets/my_campaign/items/elven_longbow.json             the model definition: which model, when
assets/my_campaign/models/item/elven_longbow*.json      the models (shapes), e.g. exported from Blockbench
assets/my_campaign/textures/item/elven_longbow*.png     the textures (a .png.mcmeta next to one animates it)

A model definition picks a model, and can change it with the item's state. A bow, like vanilla's, shows a different model while drawn:

{
  "model": {
    "type": "minecraft:condition",
    "property": "minecraft:using_item",
    "on_false": { "type": "minecraft:model", "model": "my_campaign:item/elven_longbow" },
    "on_true": {
      "type": "minecraft:range_dispatch",
      "property": "minecraft:use_duration",
      "scale": 0.05,
      "fallback": { "type": "minecraft:model", "model": "my_campaign:item/elven_longbow_pulling_0" },
      "entries": [
        { "threshold": 0.65, "model": { "type": "minecraft:model", "model": "my_campaign:item/elven_longbow_pulling_1" } },
        { "threshold": 0.9, "model": { "type": "minecraft:model", "model": "my_campaign:item/elven_longbow_pulling_2" } }
      ]
    }
  }
}

That's the whole file, for either way: assets/my_campaign/items/elven_longbow.json to link it by its id, or the path its item_model names.

Per kind of item

Item Its look Notes
Swords, axes, tools, wands, staffs one model 2D or 3D (Blockbench); how it's held is in the model's display
Bows using_item + use_duration: idle and 3 drawn stages as above
Crossbows select on minecraft:charge_type: none, arrow, rocket copy vanilla's crossbow.json
Armor, as worn "minecraft:equippable": { "slot": "chest", "asset_id": "my_campaign:invulnerable" } in the item, and in the resource pack assets/my_campaign/equipment/invulnerable.json with its texture in textures/entity/equipment/humanoid/ (humanoid_leggings/ for leggings) its icon is a normal item model; without the resource pack, the armor is invisible when worn (the asset_id has no look to fall back on)
Shields a normal model vanilla's draws banner patterns: a custom model doesn't
Tridents, arrows in hand and inventory: your model in flight they're drawn by the game as vanilla's
MineDnD thrown weapons (the throw ability) your model, also in flight the thrown weapon draws its item

New objects

For an object that's nothing like a vanilla item (a relic, a mask, a glaive), take a base with no behaviour of its own, such as minecraft:paper, and give it the behaviour with components:

For Components
A melee weapon minecraft:weapon, minecraft:attribute_modifiers (attack damage and speed), minecraft:max_damage
A tool minecraft:tool
A shield minecraft:blocks_attacks
Something worn (a mask, a cloak) minecraft:equippable
Something eaten or drunk minecraft:consumable, minecraft:food
A charm, a relic MineDnD's minednd:stat_bonus, minednd:active_ability; vanilla's minecraft:death_protection
  • A MineDnD item is never its base in a recipe (see above), so paper won't be crafted into a book. But fuel isn't a recipe: a MineDnD stick burns in a furnace. And don't use a base that places a block when used (a barrier, a structure void).
  • What components can't give needs the real base: drawing a bow, a crossbow's charge, throwing a trident, casting a rod. New blocks, mobs and how projectiles look in flight would need the mod itself.

What happens when…

The datapack's item The resource pack Players see
uses item_model installed the custom look (also when a file has its id)
uses item_model missing the "missing model" checkerboard; the item works
is linked by its id installed the custom look
is linked by its id missing the base item's look
has equippable with its own asset_id missing worn, nothing: the armor is invisible on the body (its icon follows the rows above)
(doesn't exist) has a model for it nothing: a resource pack never adds items

Sharing the resource pack

  • Modpack (.mrpack): put it in overrides/resourcepacks/ and turn it on in overrides/options.txt.
  • Server: resource-pack=<download URL> and resource-pack-sha1=<its SHA-1> in server.properties; require-resource-pack=true makes it mandatory. Players are offered it when they join.
  • Singleplayer world: a resources.zip in the world's folder loads with that world.
  • By hand: players put the zip in resourcepacks/ and turn it on in Options → Resource Packs.

The Default Content's own resource pack (resourcepacks/default-content) is a working example of the graceful way: 91 items, 57 vanilla definitions replaced, each keeping vanilla's as its fallback.

Models and textures are usually made with Blockbench (free; "Java Item" models). If you use someone else's, check their license allows sharing them the way you will (in a modpack, from a server): many store licenses allow using a model on your own server but not passing the files on.

Stat bonuses

The item component minednd:stat_bonus:

"minednd:stat_bonus": {
  "bonuses": { "str": 2, "con": 1 },
  "slot": "offhand"
}
Field Required Value
bonuses yes { "<ability>": <bonus> }: abilities str, dex, con, int, wis, cha; each bonus a whole number from −10 to 10
slot no (default any) Where the item must be for the bonus to count: any (anywhere on the body or in a hand), hand (either hand), mainhand, offhand, armor (any armor slot), head, chest, legs, feet (body and saddle are for animals and never apply to players)
- Bonuses show in the item tooltip, and in the character sheet as [+2] next to the score.
- The component also works outside the catalog, e.g. /give @s minecraft:stick[minednd:stat_bonus={bonuses:{str:2}}].

Item requirements

The item component minednd:requirements:

"minednd:requirements": { "str": 12 }
  • { "<ability>": <minimum> }: abilities str, dex, con, int, wis, cha; each minimum a whole number from 1 to 30. The item's powers work when the holder's effective score (base + bonuses of other items) is at least that.
  • When the holder doesn't meet them, the item works as its plain base item: its minednd:stat_bonus, its minednd:active_ability, all its enchantments (Infinity, Unbreaking, Mending, Efficiency, protection, …) and minecraft:unbreakable are inactive (a Flame Sword is just an iron sword; a Ranger's Bow uses arrows and wears out). The base item's own stats (attack damage, armor) and any minecraft:attribute_modifiers stay. Nothing else is blocked. Items nobody carries (in a chest, an anvil) keep their enchantments, so anvils and grindstones work as usual.
  • Potions (potion, splash and lingering bottles) have nothing plain to fall back to: below their requirements they can't be drunk or thrown, and "To use this you need: …" appears above the hotbar.
  • The tooltip shows "Requires:" with each score green (met) or red (not met), plus a warning line when inactive.
  • Requirements count bonuses from other equipped items (e.g. a Ring of Strength helps reach STR 12), also from items that have requirements themselves once theirs are met (an Elven Chain Shirt, DEX 13, +1 DEX, helps reach a Ranger's Bow's DEX 14). An item's own bonus never counts for itself, and items can't unlock each other in a loop: each needs to be met without the other.

Item abilities

The item component minednd:active_ability. Left click is always the item's normal attack. This component gives the item a power:

  • held (main hand or off hand): on right click, or on the ability key (V by default);
  • worn (helmet, chestplate, leggings, boots): on the gear key (G by default). It uses the first worn piece, from head to feet, whose power is ready; right_click doesn't matter for worn pieces.

Both keys are rebindable in Options → Controls → MineDnD.

"minednd:active_ability": {
  "type": "fireball",
  "damage": 4,
  "scaling": { "ability": "int", "per_modifier": 1.5 },
  "fire_seconds": 3,
  "cooldown": 30,
  "hunger_cost": 3
}

Types

type What it does Fields it uses
fireball A bolt of fire flies straight where you look, hits the first creature, never breaks blocks, fizzles in water or after 5 s damage, fire_seconds, speed, effects (on the target)
throw A magical copy of the weapon flies out, hits the first creature, then flies back through blocks (the real item stays in your hand) damage, fire_seconds, speed, range, effects
buff Effects and attribute boosts on you (and on allies with allies) for duration seconds: Speed, Haste, mining at 200%, a longer reach… effects, attributes, duration, allies, radius
imbue Your next hits hits (melee, arrows, spells) within duration seconds deal damage more and add effects, fire, knockback, lightning damage, hits, duration, effects, fire_seconds, knockback, lightning
heal Restores heal health to you (and allies), optionally removing harmful effects (Poison, Wither, Slowness…) heal, cure, allies, radius, effects (on who's healed)
area A burst around you: damage, knockback, fire and effects on the creatures within radius (not players, not your pets) damage, radius, knockback, fire_seconds, effects
blink Teleports you to the farthest free spot where you look, up to range blocks. Nowhere to go: nothing happens, nothing is spent range
leap Throws you where you look (at least a little upwards); no fall damage until you land speed
lightning Lightning on the creature or block you look at, up to range blocks, plus damage to the creatures it strikes. Nothing in reach: nothing is spent range, damage, effects

Fields

Field Default Range Meaning
type (required) see above
name the type's name text What the tooltip calls the power, e.g. { "translate": "ability.my_campaign.misty_step", "fallback": "Misty Step" }.
right_click true true, false Held items. true: right click uses the power, replacing the item's normal right click. false: the item keeps its normal right click (eating, drawing a bow, blocking with a shield…) and the ability key uses the power (main hand first, then off hand).
damage 4 0–100 Damage (2 = one heart): of the projectile, of the area burst, extra on imbue hits and lightning.
heal 4 0–100 Health a heal restores (2 = one heart).
scaling none { "ability": "wis", "per_modifier": 1 }: adds per_modifier × the holder's modifier (score 14 → +2, 8 → −1) to damage and heal, never below 0. per_modifier is −20 to 20, default 1.
fire_seconds 0 0–60 Sets what's hit on fire.
speed 1.5 0.1–5 Projectile speed (an arrow at full draw is about 3); leap: how hard you're thrown.
range 16 1–64 Blocks: before a throw comes back, of a blink, of a lightning.
duration 10 1–600 Seconds a buff lasts, or an imbue waits for its hits.
radius 5 1–32 Blocks around you: the area burst, and the allies of buff and heal.
knockback 0 0–10 Push of area and imbue (about 0.5 = Knockback I).
hits 1 1–20 How many hits an imbue charges.
allies false buff and heal also reach the other players within radius.
cure false heal also removes harmful effects.
lightning false imbue: each charged hit calls lightning on the target.
effects none up to 16 Potion effects: { "id": "minecraft:poison", "level": 2, "seconds": 6 }. level 1–10 (1 = Poison I), seconds 1–600; without seconds an effect lasts the duration (buff, heal) or 5 seconds (on what's hit).
attributes none up to 16 buff: attribute modifiers for duration seconds: { "id": "minecraft:block_break_speed", "amount": 1.0, "operation": "add_multiplied_base" } (+100% = mining at 200%). operation: add_value, add_multiplied_base (default), add_multiplied_total, as in vanilla attribute_modifiers.
cooldown 20 0–1200 Ticks (20 = 1 second) before the next use, shown on the hotbar.
durability_cost 0 0–100 Durability used per use (only on items with durability; Unbreaking does apply).
hunger_cost 0 0–40 Exhaustion per use, the vanilla hunger drain (4 = one hunger point). With an empty food bar the power can't be used.

Examples

{ "type": "buff", "name": { "text": "Miner's Frenzy" }, "right_click": false, "duration": 5, "cooldown": 600,
  "attributes": [{ "id": "minecraft:block_break_speed", "amount": 1.0 }] }
{ "type": "buff", "name": { "text": "Swiftness" }, "duration": 10, "cooldown": 400,
  "effects": [{ "id": "minecraft:speed", "level": 2 }] }
{ "type": "imbue", "name": { "text": "Venom Strike" }, "right_click": false, "duration": 10, "damage": 2,
  "effects": [{ "id": "minecraft:poison", "level": 2, "seconds": 6 }], "cooldown": 300 }
{ "type": "heal", "name": { "text": "Cure Wounds" }, "heal": 6, "scaling": { "ability": "wis" }, "cure": true, "cooldown": 600, "hunger_cost": 4 }
{ "type": "area", "name": { "text": "Thunderwave" }, "radius": 5, "damage": 4, "knockback": 1.5, "cooldown": 300 }
{ "type": "blink", "name": { "text": "Misty Step" }, "range": 9, "cooldown": 200 }

Useful attributes for buff: minecraft:block_break_speed (mining), minecraft:mining_efficiency (like Efficiency), minecraft:movement_speed, minecraft:attack_damage, minecraft:attack_speed, minecraft:jump_strength, minecraft:safe_fall_distance, minecraft:step_height, minecraft:block_interaction_range and minecraft:entity_interaction_range (reach), minecraft:scale (size), minecraft:armor, minecraft:knockback_resistance, minecraft:oxygen_bonus, minecraft:luck.

How abilities behave

  • On right click the ability replaces the item's normal right click: for food, bows, shields, armor and other items whose right click matters, use "right_click": false.
  • It follows minednd:requirements: below them the power is dormant and a message says which scores are missing.
  • In creative mode there's no durability or hunger cost (the cooldown still applies).
  • The tooltip shows "Right click: …", "Press V: …" or "Worn, press G: …" (the keys players actually bound), what the power does for your current scores and the costs.
  • Use rules (crafting_requirements with "applies_to": ["use"]) are checked first, like for any right click.
  • A newer boost of the same attribute replaces the older one; a new imbue replaces charged hits not used yet. Boosts, charged hits and a leap's fall protection end when the player logs out or dies.
  • Damage dealt by a power itself (area, lightning) doesn't use up imbue hits.
  • Effects follow Minecraft's rules: undead (zombies, skeletons, …) ignore Poison and Regeneration, so a poison strike against them only deals its damage; Slowness or Weakness work on everything.
  • Examples in the Default Content pack: items/weapons/wizard_staff.json (fireball, INT scaling, hunger cost), items/weapons/flame_sword.json (throw, STR scaling, fire, durability cost), items/weapons/ranger_bow.json (fireball on the ability key, so the bow still draws on right click).

Recipes

Files: data/<namespace>/recipe/**/*.json. A MineDnD item can be crafted in a crafting table with a recipe of type minednd:crafting_shaped. It's a vanilla shaped recipe whose result names the MineDnD item, so the item is defined only once, in items/:

{
  "type": "minednd:crafting_shaped",
  "category": "equipment",
  "pattern": ["CGC", "GSG", "CBC"],
  "key": {
    "C": "minecraft:copper_ingot",
    "G": "minecraft:glowstone_dust",
    "S": "minecraft:golden_sword",
    "B": "minecraft:blaze_rod"
  },
  "result": { "item": "dnd5e:weapons/sun_blade" }
}
Field Required Value
type yes minednd:crafting_shaped
pattern yes 1 to 3 strings of 1 to 3 characters each, the rows of the grid; a space is an empty slot
key yes { "<character>": <ingredient> } for each character in the pattern: an item id, "#<item tag>", a list of item ids, or a MineDnD item, { "catalog_item": "<MineDnD item id>" }
result.item yes The MineDnD item it makes: <namespace>:<path in items/>
result.count no (default 1) 1–99
category no (default misc) Recipe book tab: equipment, building, redstone, misc
group no Any text: recipes with the same group share one slot in the recipe book
show_notification no (default true) The "new recipes" toast when it unlocks
  • pattern and key work exactly as in minecraft:crafting_shaped: up to 3 rows of up to 3 characters, a space is an empty slot, and each character maps to an item id, an item tag ("#minecraft:planks") or a list of items.
  • A key can be a MineDnD item: { "catalog_item": "dnd5e:weapons/apprentice_wand" }. That's the only way a recipe takes one: a plain item never matches a MineDnD item (see MineDnD items aren't their base item below), so "minecraft:stick" doesn't accept an Apprentice Wand.
  • result.item: the item id (<namespace>:<path in items/>). Optional result.count (1-99, default 1).
  • category (optional): recipe book tab: equipment, building, redstone or misc (default).
  • show_notification (optional, default true): the "new recipes" toast when the recipe unlocks (see Unlocking below).
  • The crafted item is the catalog item exactly as it is when crafted (name, enchantments, bonuses, requirements, ability). If the catalog has no such item, the recipe crafts nothing.
  • Avoid the shape and ingredients of a vanilla recipe: when two recipes match the same grid, only one of them is used.
  • Requirement rules can restrict these recipes like any other: "recipes": ["dnd5e:weapons/sun_blade"] in crafting_requirements (the recipe id is the file's path). By result item they match the base item (e.g. minecraft:golden_sword).
  • The Default Content pack has 49 crafting recipes, 5 brewing recipes, 6 smithing recipes, 9 fletching recipes, 4 fletching upgrades, 16 imbuing recipes and 5 cooking recipes (see Default content): most upgrade the plain base item with special ingredients.

MineDnD items aren't their base item

A MineDnD item is never used as the plain item it's made from, in any recipe: vanilla's, other mods' and MineDnD's own. An Apprentice Wand isn't a stick, a Flame Sword isn't an iron sword. So MineDnD items can't be crafted into something else (torches, bookshelves, a conduit), repaired or combined in the crafting grid, smelted into nuggets, upgraded to netherite, trimmed, dyed, or brewed into splash and lingering potions by vanilla recipes.

  • A MineDnD recipe asks for a MineDnD item by id: { "catalog_item": "<id>" } in a minednd:crafting_shaped key, or as the input of a minednd:brewing recipe. Any other recipe type never takes one.
  • The recipe book doesn't pick MineDnD items up as ingredients when you click a recipe (as vanilla already skips enchanted, damaged and renamed items): put them in the grid yourself.
  • What isn't a recipe works as before: anvils, grindstones, fuel, composters, enchanting.
  • In another mod's or a vanilla recipe type, a Fabric custom ingredient { "fabric:type": "minednd:catalog_item", "item": "<id>" } matches the item too, but those recipe types still refuse MineDnD items as a whole: use a MineDnD recipe type.

Unlocking recipes

Crafting recipes unlock the Minecraft way: a recipe appears in a player's recipe book (with the "new recipes" toast) the first time they get one of its key ingredients. It's a vanilla advancement without display, in data/<namespace>/advancement/recipes/<recipe path>.json, whose reward is the recipe:

{
  "parent": "minecraft:recipes/root",
  "criteria": {
    "has_blaze_powder": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [{ "items": "minecraft:blaze_powder" }] } },
    "has_magma_cream": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [{ "items": "minecraft:magma_cream" }] } },
    "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { "recipes": "dnd5e:weapons/flame_sword" } }
  },
  "requirements": [["has_the_recipe", "has_blaze_powder", "has_magma_cream"]],
  "rewards": { "recipes": ["dnd5e:weapons/flame_sword"] }
}
  • One inventory_changed criterion per item (an item id or "#tag"), all in one requirement group: any of them is enough. has_the_recipe completes the advancement for players who already have the recipe (e.g. from /recipe give), like in vanilla.
  • Any trigger works (e.g. minecraft:player_killed_entity, or a MineDnD achievement trigger): it's a normal advancement, and /advancement and /recipe work as usual.
  • A crafting recipe that no advancement unlocks is in every player's recipe book from the start (on join and after /reload), as before: datapacks made for older versions keep working.
  • The recipe book only shows recipes: anyone who places the right ingredients crafts the item, unlocked or not (as in vanilla, unless the limitedCrafting game rule is on). To restrict crafting, use requirement rules.
  • The Default Content pack's recipes unlock from their special ingredient (e.g. blaze powder or magma cream → Flame Sword, an echo shard → Shadow Dagger).
  • Updating a world: players who joined before this version had every MineDnD recipe. On their first join they lose the ones they haven't unlocked yet (once); those whose ingredients they carry come back at once.
  • Brewing recipes aren't unlocked: the brewing stand's recipe list always shows every potion, like vanilla.

Brewing recipes

Recipe type minednd:brewing. Since Minecraft 26.3 brewing is data-driven: every vanilla potion comes from a minecraft:brewing recipe (data/minecraft/recipe/brewing/*.json in the Minecraft jar). A minednd:brewing recipe works the same way in the brewing stand, but its result names a MineDnD item, and its bottle can be one:

{
  "type": "minednd:brewing",
  "input": { "item": "minecraft:potion", "potion_contents": { "potions": "minecraft:strong_healing" } },
  "reagent": { "item": "minecraft:ghast_tear" },
  "result": { "item": "dnd5e:potions/potion_of_superior_healing" }
}
Field Required Value
type yes minednd:brewing
input yes The bottles: { "item": <bottle>, "potion_contents": { "potions": <potion> } }, where <bottle> is minecraft:potion, minecraft:splash_potion or minecraft:lingering_potion and <potion> a potion id, a list of potion ids or "#<potion tag>"; or { "catalog_item": "<MineDnD item id>" }
reagent yes The item on top: { "item": <item id, list or "#<item tag>"> }
result.item yes The MineDnD item it makes (one bottle per bottle in)
  • input: what goes in the three bottle slots, in vanilla's format: a bottle item (minecraft:potion, splash_potion or lingering_potion) and the potion it holds (potion_contents.potions: a potion id like minecraft:awkward, a list, or a potion tag). Or { "catalog_item": "<MineDnD item id>" }: a bottle of that MineDnD item, to brew one custom potion from another.
  • reagent: the item on top, in vanilla's format ({ "item": "minecraft:ghast_tear" }; a list or an item tag work too). Any item, also ones vanilla never brews with. One is used up per brew.
  • result.item: the MineDnD item it makes, exactly as defined in items/. One bottle in, one bottle out.
  • Brewing takes 20 seconds and blaze powder, like vanilla. A splash or lingering version of a custom potion is another item with its own recipe.
  • Avoid a bottle and reagent pair that vanilla (or another recipe) already uses: only one of them would work.
  • A plain minecraft:brewing recipe also works for a custom potion written out in full in output (vanilla's format), but then it can't use requirement rules by MineDnD id, nor start from a MineDnD item.
  • Players see every brewing recipe of the world, vanilla and custom, in the brewing stand's recipe list (the recipe book button): see In game below.
  • The Default Content potions: Superior Healing (Healing II + Ghast Tear), Hill Giant Strength (Strength II + Block of Iron), Heroism (Awkward Potion + Golden Apple), Invisibility (Night Vision + Golden Carrot).

Smithing recipes

Recipe type minednd:smithing: a smithing table recipe that makes a MineDnD item, usually from a MineDnD smithing template (an item of your pack built on a vanilla template, often hidden and limited):

{
  "type": "minednd:smithing",
  "template": { "catalog_item": "my_campaign:templates/ember_edge" },
  "base": { "catalog_item": "dnd5e:weapons/flame_sword" },
  "addition": "minecraft:magma_cream",
  "result": { "item": "my_campaign:weapons/ember_blade" }
}
Field Required Value
type yes minednd:smithing
template no The left slot: an item id, "#<item tag>", a list of item ids, or a MineDnD item, { "catalog_item": "<id>" }
base yes The middle slot, same forms
addition no The right slot, same forms
result.item yes The MineDnD item it makes
result.count no (default 1) 1–99
  • Taking the result uses up one template, one base and one addition, like vanilla.
  • The result is the MineDnD item exactly as defined, fresh: the base item's enchantments, damage, trims and name don't carry over (unlike vanilla's netherite upgrade).
  • A plain item never matches a MineDnD item (see above): to use a MineDnD template, base or addition, name it with catalog_item. A MineDnD template built on minecraft:netherite_upgrade_smithing_template is no longer a netherite upgrade template: vanilla recipes (the upgrade itself and the copying recipe) don't take it.
  • A MineDnD template doesn't show the vanilla template's tooltip lines ("Applies to: …", "Ingredients: …") nor the smithing table's hints for its slots: give it a minecraft:lore that says what it's for.
  • Requirement rules restrict these recipes like crafting ones ("recipes": ["<recipe id>"], or by result item), and a limited result counts when it's taken.
  • The smithing table has no recipe book: these recipes are never shown anywhere, players find out by trying.

Fletching recipes

Right-clicking a fletching table opens it, with two tabs:

  • Fletching: a 3×3 grid, like the crafting table's, for arrows, bows and crossbows. Its recipe button lists what it makes, with the ability scores each needs.
  • Upgrade: a template, a base and an addition, like the smithing table's, for legendary bows and crossbows.

Recipe type minednd:fletching is a minednd:crafting_shaped recipe that only the fletching table makes (same fields: pattern, key, result, category, group):

{
  "type": "minednd:fletching",
  "pattern": ["AAA", "AXA", "AAA"],
  "key": { "A": "minecraft:arrow", "X": "minecraft:spider_eye" },
  "result": { "item": "my_campaign:arrows/venom_arrow", "count": 8 }
}

Recipe type minednd:fletching_upgrade is a minednd:smithing recipe that only the fletching table's Upgrade tab makes (same fields: template, base, addition, result; the template, base and addition are used up, the result is fresh):

{
  "type": "minednd:fletching_upgrade",
  "template": { "catalog_item": "my_campaign:templates/oathbow_sigil" },
  "base": { "catalog_item": "my_campaign:weapons/elven_longbow" },
  "addition": "minecraft:echo_shard",
  "result": { "item": "my_campaign:weapons/oathbow" }
}
  • Vanilla's ranged recipes too: a vanilla crafting recipe whose result is in the item tag #minednd:fletching_table also works in the fletching grid (it stays in the crafting table as well). The Default Content's tag lists bows, crossbows and arrows (plain, spectral, tipped); add to it in your pack (data/minednd/tags/item/fletching_table.json).
  • The crafting table never makes minednd:fletching recipes, nor the smithing table minednd:fletching_upgrade ones.
  • Only with recipes: in a world whose datapacks have no fletching recipe, no upgrade and nothing in the tag, the fletching table stays vanilla's plain block (villagers still use it).
  • The list: the Fletching tab lists every fletching recipe (and the tagged vanilla ones), not only unlocked ones, with what a player can't make yet greyed out. Recipes with a hidden item stay secret. Upgrades aren't listed: players find them, as with smithing templates. Fletching recipes don't go in the recipe book.
  • The Upgrade tab's slots only take what some upgrade fits: templates on the left, bases in the middle, additions on the right.
  • Requirement rules and limits apply as in the crafting and smithing tables ("recipes": ["<recipe id>"] or by result item).
  • A template is any item of your pack, usually a hidden, limited one built on a vanilla template and found as loot: give it a minecraft:lore that says where it goes.

Imbuing recipes

The enchanting table has two tabs: vanilla's Enchant, and Imbue, which makes MineDnD items (wands, staffs, spellbooks, off-hand items) from a base, a catalyst and lapis lazuli, for experience levels. Its book button lists what it makes, with the cost and the ability scores each needs.

{
  "type": "minednd:imbuing",
  "base": "minecraft:stick",
  "catalyst": "minecraft:amethyst_shard",
  "lapis": 1,
  "levels": 5,
  "result": { "item": "my_campaign:weapons/wand_of_magic_missiles" }
}
Field Required Value
type yes minednd:imbuing
base yes The left slot: an item id, "#<item tag>", a list of item ids, or a MineDnD item, { "catalog_item": "<id>" }
catalyst no The middle slot, same forms; without it the middle slot must be empty
lapis no (default 1) 0–3: lapis lazuli in the right slot, used up
levels no (default 5) 1–30: experience levels paid (nothing in creative mode)
result.item yes The MineDnD item it makes
result.count no (default 1) 1–99
  • Taking the result uses up one base, one catalyst and the lapis, and costs the levels. The cost shows like the anvil's: green when the player has the levels, red when not (then the result can't be taken).
  • The crafting table never makes minednd:imbuing recipes, and they don't go in the recipe book: the Imbue tab lists every one of them, those with a hidden item only for players who may see it.
  • The base and catalyst slots only take what some recipe uses.
  • The list's tabs come from the recipes: everything, one tab for each category of the items they make (the four with most recipes), and "Other" for the rest.
  • Only with recipes: in a world whose datapacks have no imbuing recipe, the enchanting table has no Imbue tab.
  • Requirement rules and limits apply as in the crafting table. The Default Content gates imbuing by tier, like brewing: crafting_requirements/imbuing/ (basic INT 12, arcane INT 13, divine INT 12 and WIS 13, master INT 15 and WIS 12), on top of the INT 12 and WIS 10 the table itself needs.

Cooking recipes

Recipe types minednd:smelting (furnace), minednd:smoking (smoker) and minednd:campfire_cooking (campfire): cooking that makes a MineDnD item. The fields are vanilla's, the result names the MineDnD item:

{
  "type": "minednd:smoking",
  "category": "food",
  "ingredient": { "catalog_item": "my_campaign:food/seasoned_venison" },
  "result": { "item": "my_campaign:food/roast_venison" },
  "experience": 0.35,
  "cookingtime": 200
}
Field Required Value
type yes minednd:smelting, minednd:smoking or minednd:campfire_cooking
ingredient yes An item id, "#<item tag>", a list of item ids, or a MineDnD item, { "catalog_item": "<id>" }
result.item yes The MineDnD item it makes
result.count no (default 1) 1–99
cookingtime no Ticks: default 200 (10 s) in a furnace or smoker, 600 (30 s) on a campfire, as vanilla's food
experience no (default 0) Experience given when the result is taken from a furnace or smoker (vanilla food: 0.35)
category no (default misc) Recipe book tab: food, blocks, misc
group no Recipes with the same group share one slot in the recipe book
  • One file per station: to cook the same thing in a furnace, a smoker and on a campfire, write three recipes, as vanilla does (roast_venison.json, roast_venison_from_smelting.json, roast_venison_from_campfire_cooking.json).
  • Don't reuse a vanilla ingredient on the same station (raw beef in a furnace already makes steak): only one of the two recipes would be used. Cook a raw MineDnD item (with catalog_item), or something vanilla doesn't cook (an apple, rotten flesh).
  • A plain item never matches a MineDnD item (see above): a MineDnD raw food built on minecraft:mutton doesn't cook into cooked mutton, only by your recipe.
  • The furnace and smoker recipe books show them, and they unlock like crafting recipes.
  • Never a limited item: furnaces and campfires cook with nobody there, so a limited result couldn't be counted: such a recipe cooks nothing. Requirement rules don't apply to cooking either.

Loot

MineDnD items can drop from loot tables: chests, mob drops, fishing, archaeology, anything a loot table fills. Two ways:

In your own loot tables

Loot entry type minednd:catalog_item, next to vanilla's minecraft:item, in any loot table of your pack (data/<namespace>/loot_table/**/*.json, vanilla's format):

{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        { "type": "minednd:catalog_item", "item": "dnd5e:weapons/vorpal_sword", "weight": 1 },
        { "type": "minecraft:item", "name": "minecraft:diamond", "weight": 9 }
      ]
    }
  ]
}
Field Required Value
item yes The MineDnD item
count no (default 1) 1–99
weight, quality, conditions, functions no As for minecraft:item

In existing loot tables: loot injections

Files: data/<namespace>/loot_injections/**/*.json. An injection adds a MineDnD item to existing loot tables, vanilla's included, without replacing them, so it works next to other datapacks:

{ "tables": ["minecraft:chests/ancient_city", "minecraft:chests/end_city_treasure"], "item": "my_campaign:templates/ember_edge", "chance": 0.02 }
Field Required Value
tables yes A loot table id, or a list: minecraft:chests/…, minecraft:entities/…, minecraft:gameplay/fishing/treasure, …
item yes The MineDnD item
chance yes 0–1: the chance each time the table is rolled (e.g. each chest), on top of what it already gives
count no (default 1) 1–99
  • Vanilla chests roll their loot the first time they're opened (or a hopper pulls from them), not when the world is generated: an injected item goes to whoever opens the chest.
  • A limited item uses up its limit when it drops, by any way (minednd:catalog_item or an injection, a player or a hopper, /loot). When none are left it doesn't drop, so the copies go to the first players lucky enough to find them.
  • /loot give @s loot minecraft:chests/village/village_weaponsmith rolls a table by hand: handy to try an injection.
  • Don't change a limited item's count with minecraft:set_count (on the entry, its pool or the table): functions run after the limit has counted the item, so the count would be wrong. Use the entry's count. The Pack Editor warns about it.
  • /reload applies new or changed injections at once. Several injections into one table roll each on its own.
  • A broken file is skipped and logged (Skipping loot injection …).

Enchantments

Files: data/<namespace>/enchantment/*.json. These are vanilla data-driven enchantments, in Minecraft's own format; MineDnD adds one condition (below). The enchantment id is the path: data/my_campaign/enchantment/fleetfoot.json → my_campaign:fleetfoot.

{
  "description": { "translate": "enchantment.my_campaign.fleetfoot", "fallback": "Fleetfoot" },
  "supported_items": "#minecraft:enchantable/foot_armor",
  "weight": 1,
  "max_level": 2,
  "min_cost": { "base": 15, "per_level_above_first": 10 },
  "max_cost": { "base": 45, "per_level_above_first": 10 },
  "anvil_cost": 4,
  "slots": ["feet"],
  "effects": {
    "minecraft:attributes": [
      {
        "id": "my_campaign:enchantment.fleetfoot",
        "attribute": "minecraft:movement_speed",
        "amount": { "type": "minecraft:linear", "base": 0.1, "per_level_above_first": 0.1 },
        "operation": "add_multiplied_base"
      }
    ]
  }
}
Field Required Value
description yes The name: a text component, best { "translate": "enchantment.<namespace>.<name>", "fallback": … }
supported_items yes Items it can go on: an item id, a list, or an item tag such as #minecraft:enchantable/weapon, …/melee_weapon, …/sword, …/bow, …/crossbow, …/trident, …/mace, …/mining, …/head_armor, …/chest_armor, …/leg_armor, …/foot_armor, …/armor, …/fishing, …/durability
primary_items no The items it's offered for in an enchanting table (default: supported_items)
weight yes 1–1024: how often it's picked (vanilla: 10 common, 5 uncommon, 2 rare, 1 very rare)
max_level yes 1–255
min_cost, max_cost yes { "base": <n>, "per_level_above_first": <n> }: the enchanting table levels it appears at
anvil_cost yes Base cost of applying it in an anvil
slots yes Where the item must be for the effects to work: any of any, mainhand, offhand, hand, head, chest, legs, feet, armor, body, saddle
exclusive_set no Enchantments it can't be combined with: an id, a list or an enchantment tag
effects no What it does: effect components (minecraft:damage, minecraft:post_attack, minecraft:attributes, minecraft:armor_effectiveness, minecraft:knockback, minecraft:tick, minecraft:damage_protection, minecraft:block_experience, …), each with its own format

The effect components and their formats are Minecraft's: see the Minecraft Wiki's Enchantment definition page, and the 24 files of the Default Content pack (listed in Enchantments) as working examples.

Where it can be found is decided by vanilla's enchantment tags, in data/minecraft/tags/enchantment/ (add your enchantment's id to their values, with "replace": false):

Tag The enchantment…
#minecraft:in_enchanting_table is offered by enchanting tables
#minecraft:non_treasure counts as a normal enchantment (for enchanting tables and random enchanting)
#minecraft:treasure is a treasure enchantment: never from enchanting tables
#minecraft:on_random_loot appears on enchanted loot (chests, fishing)
#minecraft:tradeable appears on librarian enchanted books
#minecraft:on_mob_spawn_equipment, #minecraft:on_traded_equipment appears on mobs' gear / villagers' traded gear
#minecraft:curse is a curse (red name, kept by grindstones)
  • Custom enchantments appear in the MineDnD creative tab as enchanted books (one per level).
  • They don't show up in enchanting tables unless you also add them to the vanilla #minecraft:in_enchanting_table tag.
  • Give them a translatable name: "description": { "translate": "enchantment.my_campaign.holy_strike", "fallback": "Holy Strike" }.

The example pack contains three enchantments to copy from:

File Type Does
holy_strike.json minecraft:damage Extra damage against undead
venom_strike.json minecraft:post_attack Poisons the target, only if the attacker has STR 12 and DEX 12
fleetfoot.json minecraft:attributes +10% movement speed per level while worn on the feet

Ability requirements on enchantments

The condition minednd:ability_scores works in any effect's requirements (and in loot tables and predicates):

"requirements": {
  "type": "minednd:ability_scores",
  "entity": "attacker",
  "min": { "str": 12, "dex": 12 }
}
Field Required Value
type yes minednd:ability_scores
min yes { "<ability>": <minimum> }: abilities str, dex, con, int, wis, cha, each 1–30; all must be met
entity no (default attacker) Whose scores: attacker (the wielder, in attack effects), this (the enchanted item's holder, in effects that run on it: minecraft:tick, minecraft:attributes, protection…), direct_attacker, attacking_player, target_entity, interacting_entity (as in vanilla loot conditions)
  • Uses effective scores (base + item bonuses).
  • Non-player entities (e.g. a mob holding the weapon) have no D&D stats and always pass.
  • Combine with other conditions using minecraft:all_of, as in venom_strike.json.
  • Unlike minednd:requirements on items, this isn't shown in tooltips: mention it in the item's lore if players should know.

Changing vanilla enchantments

Vanilla enchantments are data too, so a datapack can go past their levels: Protection VI, Sharpness X, Feather Falling X… Two ways, from the safest:

Higher levels on MineDnD items only. Write the level in the item: "minecraft:enchantments": { "minecraft:protection": 7 } (1–255). The enchantment's effects follow its formula (Protection +1 point per level, Sharpness +0.5 damage), so level 7 is stronger than IV, and nothing else changes: enchanting tables, anvils and other items stay vanilla. The Default Content's Vorpal Sword (Sharpness VIII), Infernal Cuirass (Fire Protection VI), Boots of Featherfall (Feather Falling X) and Armor of Invulnerability (Protection XV) do this.

Overriding the enchantment. A file with the vanilla path, data/minecraft/enchantment/<name>.json, replaces it. Start from vanilla's file (in the Minecraft jar, data/minecraft/enchantment/, or on the Minecraft Wiki) and raise max_level. This example lets Protection go to VI, with levels V and VI working only for a wearer with CON 14:

{
  "description": { "translate": "enchantment.minecraft.protection" },
  "supported_items": "#minecraft:enchantable/armor",
  "weight": 10,
  "max_level": 6,
  "min_cost": { "base": 1, "per_level_above_first": 11 },
  "max_cost": { "base": 12, "per_level_above_first": 11 },
  "anvil_cost": 1,
  "slots": ["armor"],
  "exclusive_set": "#minecraft:exclusive_set/armor",
  "effects": {
    "minecraft:damage_protection": [
      {
        "effect": {
          "type": "minecraft:add",
          "value": { "type": "minecraft:clamped", "value": { "type": "minecraft:linear", "base": 1, "per_level_above_first": 1 }, "min": 0, "max": 4 }
        },
        "requirements": {
          "type": "minecraft:damage_source_properties",
          "predicate": { "tags": [{ "id": "#minecraft:bypasses_invulnerability", "expected": false }] }
        }
      },
      {
        "effect": {
          "type": "minecraft:add",
          "value": { "type": "minecraft:clamped", "value": { "type": "minecraft:linear", "base": -3, "per_level_above_first": 1 }, "min": 0, "max": 2 }
        },
        "requirements": {
          "type": "minecraft:all_of",
          "terms": [
            { "type": "minecraft:damage_source_properties", "predicate": { "tags": [{ "id": "#minecraft:bypasses_invulnerability", "expected": false }] } },
            { "type": "minednd:ability_scores", "entity": "this", "min": { "con": 14 } }
          ]
        }
      }
    ]
  }
}
  • What a higher max_level changes: anvils combine up to it, and books and loot can carry it.
  • Enchanting tables won't offer the new levels with vanilla costs: a table's power tops out around 30, and a level is offered only when its min_cost is below the power (Protection V: 1 + 4 × 11 = 45). Lower min_cost to let them appear. Anvils refuse a combination that costs 40 levels or more ("Too Expensive!") in survival.
  • In the example, the first effect gives levels I–IV as vanilla (capped at 4 points with minecraft:clamped), and the second adds levels V–VI (linear from −3, clamped at 0–2) only when the wearer has CON 14 (minednd:ability_scores, "entity": "this").
  • Enchantments load with the world: restart the world (or server) after changing them, /reload isn't enough. If two packs override the same enchantment, the higher one wins.

Levels above X need a name. The game names levels I–X; Protection 11 shows "Protection enchantment.level.11". Add the names to a pack's translations: "enchantment.level.11": "XI". The Default Content has XI to XX, in English and Italian. Players without the mod see the raw key.

The protection cap. The protection enchantments of everything you wear add up to points, and the game stops at 20 points: 80 % less damage. No datapack can go past it.

Enchantment Points per level Alone, it reaches 80 % at
Protection 1 (any damage) XX
Fire, Blast, Projectile Protection 2 (that damage only) X
Feather Falling 3 (falls only) VII

Protection IV on all four pieces already gives 16 points, so higher Protection mostly helps with less armor. The Pack Editor notes a level past the cap, and a level above X.

What else scales: Sharpness, Smite, Bane of Arthropods, Power, Efficiency, Unbreaking, Looting and Fortune keep growing with the level. Some stop at a game limit: Depth Strider at III (full speed in water), Quick Charge around V (instant reload), Swift Sneak at full speed while sneaking.

Requirement rules

Files: data/<namespace>/crafting_requirements/**/*.json. Ability scores a player needs to craft a recipe or brew a potion and, optionally, to place or use an item (drink or throw a potion). Things not matched by any file have no requirements. Rules check the player's base scores: bonuses from items and the title don't count (STR 12 with a +2 STR ring doesn't meet STR 13).

{
  "recipes": ["minecraft:redstone_torch"],
  "requirements": { "int": 12, "wis": 10 }
}
{
  "items": "minecraft:anvil",
  "applies_to": ["craft", "place"],
  "requirements": { "str": 13 }
}

Potions, by the potion they hold (in any bottle) or in some bottles only:

{
  "potions": ["minecraft:healing", "minecraft:strong_healing"],
  "requirements": { "wis": 12, "int": 10 }
}
{
  "items": "minecraft:splash_potion",
  "potions": "#dnd5e:harmful",
  "applies_to": ["craft", "use"],
  "requirements": { "int": 12 }
}

Different scores for each action:

{
  "items": "minecraft:enchanting_table",
  "requirements": {
    "craft": { "int": 14 },
    "place": { "int": 12 },
    "use": { "int": 12, "wis": 10 }
  }
}
  • recipes (optional): recipe ids, crafting or brewing. A vanilla recipe's id is its file name in the Minecraft jar under data/minecraft/recipe/: usually the item name (minecraft:redstone_torch), but some items have several recipes with other ids (e.g. minecraft:red_dye_from_poppy). Vanilla brewing recipes are minecraft:brewing/<bottle>_<potion>_<reagent>, e.g. minecraft:brewing/potion_awkward_ghast_tear. A MineDnD recipe's id is its file's path, e.g. dnd5e:potions/potion_of_heroism.
  • items (optional): targets every recipe whose result is this item, a list of items, or an item tag ("#minecraft:planks"). Handy when an item has several recipes.
  • potions (optional): potions, by what the bottle holds: a potion id (minecraft:healing), a list, or a potion tag ("#dnd5e:harmful"). Long and strong versions are separate potions (minecraft:long_poison, minecraft:strong_healing). Alone, it covers potions, splash and lingering potions and tipped arrows holding them; with items, only those items holding them (e.g. splash potions of poison, not drinkable ones).
  • At least one of recipes / items / potions is required. One file can list many recipes.
  • applies_to (optional, default ["craft"], only with the same-scores form): what the rule restricts. Any of:
  • craft: making it: crafting the recipe (crafting table, inventory grid; Crafters refuse it), or brewing the potion (brewing stand).
  • place: placing the item as a block. The block stays in the hand.
  • use: using the item (right click: eat, drink, throw, ...) and interacting with its placed block (e.g. opening an enchanting table). Blocked interactions do nothing, so you can still place blocks against it. For recipes rules, place and use apply to the recipe's result item.
  • requirements, one of two forms:
  • Same scores for every action: { "int": 12, "wis": 10 } (any of str, dex, con, int, wis, cha), applied to each action in applies_to.
  • Scores per action: { "craft": {…}, "place": {…}, "use": {…} }, listing only the actions to restrict. applies_to isn't used with this form. Scores are effective scores (item bonuses count).
  • Scores are whole numbers from 1 to 30; at least one ability for each restricted action.
  • If several files match the same recipe or item, the highest minimum per ability applies.
  • A file that breaks these is skipped, and the log says why: a rule needs "recipes", "items" or "potions", "applies_to" can't be combined with requirements per action, "applies_to" needs at least one of craft, place, use, "requirements" needs at least one ability score for each action.

In game:

  • Crafting: applies to the crafting table, the 2x2 inventory grid and the smithing table. When the player doesn't qualify, the result slot stays empty and "To craft this you need, without bonuses: Intelligence 12, Wisdom 10" appears above the hotbar.
  • Placing and using: the action is blocked with "To place this you need, without bonuses: ..." / "To use this you need, without bonuses: ...". Players in creative mode are exempt from place and use (e.g. an operator building the world); crafting is restricted for everyone.
  • Item tooltips list the requirements per action ("To craft: Intelligence 14", "To place: ..."), green when the player's base scores meet them, red when not.
  • Blocks already placed in the world stay where they are; use decides whether players can interact with them.
  • The recipe book still lists the recipe (it can't know about requirements); it just won't produce a result.
  • Crafter blocks can't craft restricted recipes, since there's no player to check (otherwise they'd bypass the requirement).
  • Crafting, smithing and brewing only: furnaces and stonecutters are not restricted.
  • /reload applies changes.

Brewing in game

  • The brewing stand brews a restricted potion only for its brewer: the player who last put in or took out its bottles, reagent or blaze powder. Their scores decide, while they're online. Bottles they can't brew stay as they are (the others in the stand still brew), and "To brew this you need: Wisdom 12, Intelligence 10" appears above their hotbar when they set it up.
  • A stand filled only by hoppers, or whose brewer is offline, doesn't brew restricted potions (like a Crafter with restricted recipes).
  • Potion tooltips say "To brew: …" (and "To use: …" for drinking or throwing), green or red for the player.
  • The brewing stand has a recipe list, opened with the recipe book button: every potion of the world (vanilla, MineDnD and datapacks), with tabs for potions, splash, lingering and custom ones, a search box, and a filter for what the player can brew now. Hovering a potion shows what goes in the bottles and on top, and its requirements; clicking it shows the recipe faded in the stand's slots (click again for other ways to brew it), and clicking a faded bottle shows how to brew that bottle in turn. A greyed-out bottle means the player's scores are too low; a red slot that they lack the ingredients.

Default brewing tiers

The Default Content pack (crafting_requirements/brewing/, with the potion tags #dnd5e:effects, #dnd5e:enhanced and #dnd5e:harmful) gives every vanilla potion a tier. Rules add up: the highest score per ability wins.

Potions To brew
Water, Awkward, Mundane, Thick (any bottle) Nothing
Potions with effects (#dnd5e:effects) WIS 10
Stronger (II) and longer versions (#dnd5e:enhanced), splash potions with effects WIS 12, INT 10
Lingering potions with effects WIS 13, INT 12
Harmful potions (#dnd5e:harmful: poison, harming, weakness, slowness) INT 11; lingering: INT 13
Superior Healing / Hill Giant Strength / Heroism / Invisibility WIS 14 INT 12 / WIS 13 INT 13 / WIS 14 CHA 12 / WIS 13 INT 14

To change a tier, put a file with the same path in your own pack (e.g. data/dnd5e/crafting_requirements/brewing/splash_potions.json): it replaces the Default Content one (your pack must be above it, see load order). To drop a tier, replace it with scores of 1 (a rule needs at least one score), or delete the file from your copy of the Default Content pack.

Tags

Files: data/<namespace>/tags/<type>/<name>.json, the tag #<namespace>:<name>. Minecraft's format:

{ "replace": false, "values": ["minecraft:poison", "minecraft:long_poison", "#dnd5e:harmful"] }
Field Required Value
values yes Ids and other tags of the same type; { "id": "<id>", "required": false } skips an id that doesn't exist (another mod's)
replace no (default false) true: drop what lower packs put in this tag, instead of adding to it

<type> is the folder of the kind of id: potion, block, item, entity_type, enchantment, worldgen/biome, damage_type, … Tags MineDnD reads by name:

Tag Type Used for
#minednd:first_time_xp block Blocks that give adventure XP the first time each is mined (new_block); empty without the Default Content pack
#minecraft:in_enchanting_table, #minecraft:treasure, … enchantment Where an enchantment can be found (Enchantments)
any potion tag, e.g. #dnd5e:effects, #dnd5e:enhanced, #dnd5e:harmful (Default Content) potion potions in requirement rules, input of brewing recipes, of of minednd:discovered with brew

Any tag can be used wherever a field says "or a #tag": items of rules, ingredients, of, target, title conditions…

Achievements

Files: data/<namespace>/advancement/**/*.json. Achievements are vanilla advancements: the game shows them in the advancements screen (their own tab if you make a root), with the notification and the chat message. Any vanilla trigger works; MineDnD adds triggers for what vanilla can't count. The Default Content pack has a MineDnD tab (minednd:minednd/..., 27 advancements, some hidden) that unlocks the starter titles. The id is the path: data/my_campaign/advancement/quests/dragon.json → my_campaign:quests/dragon.

An advancement file (Minecraft's format; full details on the Minecraft Wiki's Advancement definition page):

Field Required Value
parent no The advancement it hangs from. Without a parent it's the root of a new tab
display no How it shows; without display it's invisible (like recipe unlocks)
display.icon yes (in display) { "id": "<item id>" } (also count, components)
display.title, display.description yes (in display) Text components, best { "translate": … }
display.frame no (default task) task, goal or challenge: the frame, the message, and the adventure XP it gives (advancement_task / _goal / _challenge in the settings)
display.background root only The tab's background texture, e.g. minecraft:block/stone
display.show_toast, display.announce_to_chat no (default true) The notification and the chat message
display.hidden no (default false) Not shown (nor its children) until done
criteria yes { "<name>": { "trigger": "<trigger id>", "conditions": { … } } }: what has to happen
requirements no (default: all criteria) A list of lists of criterion names: every inner list needs one of its criteria
rewards no experience (vanilla XP), recipes (recipe ids), loot (loot table ids), function

MineDnD's triggers, for criteria (any vanilla trigger works too):

Trigger Conditions Completes when
minednd:discovered kind, min (1–10,000), optional of (ids or #tags) the player has min different first times of kind: biome, mob, death, dimension, structure, block, craft, food, effect, tame, breed, catch, brew, trade, enchantment (e.g. "of": ["#minecraft:is_nether"] counts only Nether biomes)
minednd:statistic stat (a statistic type: minecraft:mined, killed, crafted, used, custom, …), target (an id, or a #tag whose members are added up), min the statistic reaches min ("stat": "minecraft:mined", "target": "#c:ores", "min": 300)
minednd:cooked optional item (item conditions), food (true: only food) the player takes cooked results out of a furnace, smoker or blast furnace, or food they put on a campfire finishes cooking
minednd:level min the character reaches that level
minednd:ability_score optional ability (str, dex, …; any when absent), min the character's own score (not item bonuses) reaches min
minednd:repeat count (1–1,000,000), of (any criterion: {"trigger": …, "conditions": …}) of has happened count times (cooked counts each item)
{
  "parent": "dnd5e:achievements/archer_2",
  "criteria": {
    "cows": {
      "trigger": "minednd:repeat",
      "conditions": {
        "count": 1000,
        "of": {
          "trigger": "minecraft:player_killed_entity",
          "conditions": {
            "entity": { "type": "minecraft:entity_properties", "entity": "this", "predicate": { "minecraft:entity_type": "minecraft:cow" } },
            "killing_blow": { "direct_entity": { "minecraft:entity_type": "#minecraft:arrows" }, "tags": [{ "id": "#minecraft:is_projectile", "expected": true }] }
          }
        }
      }
    }
  },
  "display": {
    "icon": { "id": "minecraft:leather" },
    "title": { "translate": "advancements.dnd5e.cow_slayer.title" },
    "description": { "translate": "advancements.dnd5e.cow_slayer.description" },
    "frame": "challenge",
    "hidden": true
  }
}

Trigger reference

Every MineDnD trigger also takes an optional player: conditions on the player (loot conditions, as in vanilla triggers), e.g. "player": [{ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "location": { "dimension": "minecraft:the_nether" } } }].

minednd:discovered: how many different things of a kind the player has done for the first time.

Field Required Value
kind yes One of the kinds below
min yes 1–10,000 different ones
of no Only count these: a list of ids and/or #tags of that kind (e.g. ["#minecraft:is_nether"] for biomes)
kind One per different… Ids and tags in of
biome biome entered biomes: minecraft:plains, #minecraft:is_ocean
mob kind of creature killed (hostile ones; also animals with the setting passive_kills) entity types: minecraft:zombie, #minecraft:undead
death cause of death damage types: minecraft:drown, minecraft:lava, minecraft:fall, #minecraft:is_fire
dimension dimension entered (the one you start in counts) dimensions: minecraft:the_nether, minecraft:the_end
structure kind of structure walked into; variants count once as their family (minecraft:village, minecraft:mineshaft, minecraft:ocean_ruin, minecraft:shipwreck, minecraft:ruined_portal, minecraft:abandoned_camp) structures: minecraft:stronghold, minecraft:village, or structure tags
block block of #minednd:first_time_xp mined blocks: minecraft:diamond_ore, #c:ores
craft item crafted or smelted (MineDnD items by their own id) items, item tags
food food or drink tried items, item tags
effect status effect received effects: minecraft:speed (no tags)
tame, breed kind of animal tamed / bred entity types, entity tags
catch item fished up items, item tags
brew kind of potion taken out of a brewing stand potions: minecraft:strong_healing, #dnd5e:harmful
trade villager profession traded with (and the wandering trader) professions: minecraft:librarian; minecraft:wandering_trader
enchantment enchantment received from an enchanting table enchantments, enchantment tags

minednd:statistic: a vanilla statistic (the Statistics screen) reaches a value.

Field Required Value
stat yes The statistic type, below
target yes What it counts, an id or a #tag (a tag adds up all its members)
min yes 1 or more
stat target is Example
minecraft:mined a block or block tag #minecraft:logs, #c:ores
minecraft:crafted, minecraft:used, minecraft:broken, minecraft:picked_up, minecraft:dropped an item or item tag minecraft:bow used
minecraft:killed, minecraft:killed_by an entity type or entity tag minecraft:zombie, #minecraft:undead
minecraft:custom a custom statistic (no tags) minecraft:walk_one_cm, minecraft:jump, minecraft:fish_caught, minecraft:play_time (ticks), minecraft:deaths, minecraft:mob_kills, minecraft:damage_dealt (tenths of a heart)

minednd:cooked: the player takes cooked results out of a furnace, smoker or blast furnace, or food they put on a campfire finishes cooking.

Field Required Value
item no Only these results: item conditions, as in vanilla ({ "items": "minecraft:cooked_beef" }, { "items": "#minecraft:fishes" })
food no (default false) true: only food

minednd:level: min (1–100, required): the character's level.

minednd:ability_score: the character's own score (not item bonuses).

Field Required Value
ability no (any) str, dex, con, int, wis, cha
min yes 1–30

minednd:repeat: another criterion, N times.

Field Required Value
of yes Any criterion: { "trigger": "<trigger id>", "conditions": { … } }, a vanilla or MineDnD trigger that fires for a player (kills, items, effects, minednd:cooked, …)
count yes 1–1,000,000 times (minednd:cooked counts each item taken)
  • What counts: first times are recorded in every world (also with adventure XP off), and vanilla statistics from the start of the world, so discovered and statistic count what was done before the advancement existed. repeat and cooked count from when the advancement is there. Progress of repeat is saved per player.
  • Adventure XP: advancements give their frame's XP (advancement_task / _goal / _challenge), except those that count repetitions (a minednd:repeat or minednd:statistic criterion): reward those with a title.
  • Showing progress: a criterion is done or not, so "37/50" doesn't show. Make chains of thresholds instead (25 → 45 → 60 biomes), each its own advancement, like the Default Content tab does.
  • Hidden: "hidden": true keeps an advancement out of the tab until it's done.

Titles

Files: data/<namespace>/title/*.json. A title is a reward worn above the head. It unlocks when its advancement is done (and locks again if that's revoked); a player wears one at a time, chosen in the character sheet or with /dnd title, and only the worn title's effects apply. The Default Content pack has ten: The Miner, Zombie Killer, The Archer, The Explorer, The Lumberjack, The Angler, The Master Chef, The Alchemist, The Survivor and (hidden) The Cow Slayer.

{
  "name": { "translate": "title.dnd5e.miner", "color": "gray" },
  "description": { "translate": "title.dnd5e.miner.description" },
  "unlocked_by": "dnd5e:achievements/miner_2",
  "effects": [
    { "type": "enchantment_level", "enchantment": "minecraft:fortune", "level": 1, "item": "#minecraft:pickaxes", "blocks": "#c:ores" }
  ]
}
Field Required Value
name yes Text component shown above the head: translatable, with a color
description no Text component: what it gives, in the character sheet's tooltip
unlocked_by yes The advancement id that unlocks it
effects no A list of effects, below; only the worn title's apply

The title id is the path: data/my_campaign/title/dragonslayer.json → my_campaign:dragonslayer (for /dnd title wear). In effects, item (items), target (entity types) and blocks (blocks) are optional conditions: an id, a #tag or a list of them; without one the effect applies to everything.

Effect type Fields While worn
enchantment_level enchantment, level (1–255), optional item, target, blocks the item counts as having that enchantment at that level: Looting (kills), Fortune (block drops), Luck of the Sea (fishing); a real higher level wins, the two don't add up
damage_bonus amount (0.1 = +10%), optional item, target more damage (melee, arrows, tridents) against target / with item
ability_bonus ability, amount (−10–10) an ability score bonus, like an item's (it counts for requirements)
xp_bonus amount, optional sources (list) more adventure XP from these sources (all when absent): a first-time kind (biome, mob, death, dimension, structure, block, craft, food, effect, tame, breed, catch, brew, trade, enchantment), advancement, kill (later kills) or vanilla_xp
break_speed amount, optional blocks breaks those blocks faster
hunger amount (−0.05 = 5% slower) hunger drains faster or slower
max_health amount (2 = 1 heart) extra max health
potion_duration amount potions the player drinks last longer

Amounts are decimals from −1 to 10 (0.1 = +10%), except ability_bonus (whole −10 to 10) and max_health (whole −19 to 100, in health points). A broken title file is logged and skipped.

World settings

File: data/minednd/settings.json. How ability scores affect the world, how characters progress (and level up by playing), and how requirement rules behave, per world. The Default Content pack has this file with every value, all at their defaults except adventure XP (on, without repeat kills): copy it as a starting point. Every field is optional: anything missing uses the default, so a campaign only writes what it changes:

{
  "abilities": { "strength": { "melee_damage_per_modifier": 0.2 } },
  "progression": { "points_per_level": 5 }
}

The full file with every default:

{
  "abilities": {
    "strength": {
      "melee_damage_per_modifier": 0.10,
      "min_melee_damage_multiplier": 0.5,
      "log_speed_per_modifier": 0.15,
      "min_log_speed_multiplier": 0.5,
      "mining_speed_per_modifier": 0.10,
      "min_mining_speed_multiplier": 0.5
    },
    "dexterity": {
      "speed_per_modifier": 0.04,
      "min_speed_multiplier": 0.75,
      "attack_rate_per_modifier": 0.08,
      "min_attack_rate_multiplier": 0.7
    },
    "constitution": {
      "health_per_modifier": 2,
      "min_health_bonus": -10,
      "hunger_per_modifier": 0.07,
      "min_hunger_multiplier": 0.25,
      "max_hunger_multiplier": 1.5
    },
    "intelligence": {
      "xp_per_modifier": 0.10,
      "min_xp_multiplier": 0.5,
      "enchant_levels_per_modifier": 1.0,
      "imbue_levels_per_modifier": 0.5,
      "anvil_cost_per_modifier": 0.05,
      "min_anvil_cost_multiplier": 0.5,
      "max_anvil_cost_multiplier": 1.25
    },
    "wisdom": {
      "harmful_effect_per_modifier": 0.10,
      "min_harmful_effect_multiplier": 0.5,
      "max_harmful_effect_multiplier": 1.25,
      "potion_duration_per_modifier": 0.10,
      "min_potion_duration_multiplier": 0.7,
      "luck_per_modifier": 0.4,
      "min_luck": -2
    },
    "charisma": {
      "trade_discount_per_modifier": 0.05,
      "max_trade_discount": 0.5,
      "max_trade_markup": 0.15,
      "barter_bonus_chance_per_modifier": 0.05,
      "gossip_per_modifier": 0.10,
      "min_gossip_multiplier": 0.5,
      "golem_peace_min_score": 16,
      "detection_per_modifier": 0.05,
      "min_detection_multiplier": 0.5,
      "max_detection_multiplier": 1.15
    }
  },
  "progression": {
    "starting_score": 10,
    "points_per_level": 3,
    "max_level": 20,
    "max_score_from_points": 20
  },
  "experience": {
    "enabled": false,
    "level_curve": "exponential",
    "level_xp_base": 3000,
    "level_xp_increase": 150,
    "level_xp_growth": 1.05,
    "level_xp_formula": "3000 * 1.05^(level - 1)",
    "level_xp_table": [],
    "per_vanilla_xp": 0.0,
    "per_kill_health": 0.5,
    "passive_kills": false,
    "repeat_kills": true,
    "repeat_kill_health": 0.25,
    "daily_xp_cap": 60,
    "advancement_task": 25,
    "advancement_goal": 75,
    "advancement_challenge": 200,
    "death_loss": 0.0,
    "new_mob": 25,
    "new_biome": 15,
    "new_death": 25,
    "new_dimension": 100,
    "new_structure": 40,
    "new_block": 10,
    "new_craft": 3,
    "new_food": 5,
    "new_effect": 10,
    "new_tame": 30,
    "new_breed": 15,
    "new_catch": 10,
    "new_brew": 10,
    "new_trade": 15,
    "new_enchantment": 20
  },
  "requirements": {
    "creative_exempt": true
  }
}
  • Ability effects are 1 + rate × ability modifier, never below the min_… floor. A rate of 0 turns that effect off. Example: melee_damage_per_modifier: 0.2 makes STR 20 (+5) deal ×2.0 damage instead of ×1.5. Ranges: rates 0–10, floors 0–1 (attack rate 0.1–1), health_per_modifier 0–20 health (2 = 1 heart), min_health_bonus −19–0, hunger_per_modifier 0–1, max_hunger_multiplier 1–10.
  • Effects that go down as the score goes up (hunger, harmful effects, anvil cost, trade prices) are 1 − rate × modifier, between their min_… and max_… (low scores make them go up, up to the max_…). Charisma's max_trade_discount and max_trade_markup are fractions: 0.5 = at most half price, 0.15 = at most 15% more.
  • Levels (enchant_levels_per_modifier, imbue_levels_per_modifier) are rate × modifier, rounded toward zero: the levels a player counts as having extra for an enchanting table offer's requirement, and the levels taken off an imbuing recipe's cost (never below 1). luck_per_modifier adds to vanilla's luck attribute, never below min_luck (−1024–0).
  • Charisma's others: barter_bonus_chance_per_modifier is a chance (CHA 20 with 0.05: 25%) that a piglin gives a second roll of its barter loot; golem_peace_min_score (0–30, 0 = off) is the CHA score from which iron golems don't attack over villagers' opinion; gossip_… scales the good opinion villagers gain (trades, curing), and detection_… the distance hostile mobs notice the player from (like sneaking).
  • Progression: starting_score (1–30) for new characters and resets, points_per_level (0–100), max_level (1–100), max_score_from_points (1–30, D&D: 20). Changes apply from now on: existing characters keep their scores and points (use /dnd reset to rebuild one).
  • Experience (adventure XP: players level up by playing; separate from vanilla XP):
  • enabled (default false; the Default Content pack sets true): true lets players earn XP by playing. While it's off, only an operator gives levels and XP (/dnd level add, /dnd xp add), and the sources below are ignored. Vanilla XP always works as usual.
  • Level curve: what each level costs. level_curve picks the shape; with L the level being left (1 for 1 → 2), level L → L+1 costs:

    level_curve Cost of L → L+1 Uses
    linear base + increase × (L − 1): the same extra XP every level level_xp_base, level_xp_increase
    exponential (default) base × growth^(L − 1): each level a fixed % more than the last (1.05 = +5%; below 1 = cheaper) level_xp_base, level_xp_growth
    logarithmic base × (1 + growth × ln L): rises quickly, then flattens level_xp_base, level_xp_growth
    power base × L^growth (2 = quadratic) level_xp_base, level_xp_growth
    formula your own expression of level level_xp_formula
    table the listed costs in order; past the end, the last one repeats level_xp_table

    Ranges: level_xp_base 1–1,000,000, level_xp_increase 0–1,000,000, level_xp_growth 0–100, level_xp_table up to 100 costs of 1–1,000,000,000 (a table curve needs it in the same file). A formula may use numbers, + - * / %, ^ (power), parentheses, e, pi and ln (also log), log10, log2, sqrt, exp, abs, floor, ceil, round, min(a, b), max(a, b), pow(a, b), e.g. 1000 + 500 * ln(level) or 300 * level^2; one that gives no number at some level up to 100 (like ln(level - 1) at level 1) makes the file invalid. Costs are rounded and at least 1. With the defaults: 3000, 3150, 3308, … 7220 for 19 → 20. - Balance of the defaults: level 2 after about 3–4 days of play (at ~2 hours a day), each next level a bit longer than the last (about 6, 8, 9 … days), level 20 a long-term goal (around 300+ days of play). First times give most XP early and become rare later, so later kills (repeat_kills) keep high levels reachable; daily_xp_cap keeps farms from replacing adventuring. These are estimates from a model of how fast a typical player finds new things: tune level_xp_base to move level 2, level_xp_growth for the later levels. The Default Content pack turns repeat kills off, so there high levels take longer: lower level_xp_growth to make up for it. - By default XP comes from first times (the new_… values below), advancements and a little from later kills. Grinding can't go past the daily cap. - Kills: new_mob for the first kill of each hostile mob type, plus per_kill_health per point of its max health (0–100; passive_kills: true also counts animals). Later kills of a type give repeat_kill_health per point of max health (0–100, default 0.25: zombie 5 XP; repeat_kills: false turns them off, as the Default Content pack does). per_vanilla_xp per vanilla XP point picked up from orbs (0–100, default 0). Later kills and orbs together give at most daily_xp_cap XP per Minecraft day of play (20 minutes, counted by world time, so sleeping doesn't reset it; 0–1,000,000, default 60, 0 = no limit). advancement_task, advancement_goal, advancement_challenge: advancements shown in the advancements screen. - First times, each counted once per player (0–100,000; 0 turns one off):

    Setting The first time a player… Default
    new_mob kills each mob type (plus the health-based XP) 25
    new_biome enters each biome 15
    new_death dies from each cause, i.e. damage type (drowning, lava, falling, a creeper, …) 25
    new_dimension enters each dimension, except the one they start in 100
    new_structure walks inside each structure; variants in the vanilla tags #village, #mineshaft, #ocean_ruin, #shipwreck, #ruined_portal, #abandoned_camp count once 40
    new_block mines each block of the block tag #minednd:first_time_xp (in the Default Content pack: #c:ores, ancient debris, amethyst, sculk, spawners, suspicious sand and gravel, …; without a pack that fills the tag, no block gives this XP) 10
    new_craft crafts or smelts each item (crafting table, furnace, stonecutter, smithing table, …); MineDnD items count by their own id 3
    new_food eats or drinks each item (food, potions, milk, honey) 5
    new_effect gets each status effect 10
    new_tame / new_breed tames / breeds each kind of animal 30 / 15
    new_catch fishes up each item 10
    new_brew takes each kind of potion out of a brewing stand 10
    new_trade trades with each villager profession (and the wandering trader) 15
    new_enchantment gets each enchantment from an enchanting table 20

    What a player has already done is saved with the player (in every world, also while adventure XP is off): changing these values never pays twice. To choose the blocks, add to or replace the tag in a datapack (data/minednd/tags/block/first_time_xp.json, "replace": true to start from scratch). Structure and dimension names come from the language keys structure.<namespace>.<path> and dimension.<namespace>.<path> (else the id in words). - death_loss (0–1): share of the XP towards the next level lost on death (0.5 = half). Levels are never lost. - /dnd xp add / /dnd xp set give or set XP by hand, also while enabled is false. - Requirements: creative_exempt (default true) lets creative players ignore place and use rules. - /reload applies changes; online players' health, speed and damage are updated right away. - Every value has its default in the mod: a world with no settings.json in any pack uses the values above. The Default Content pack doesn't change them either. Copy the full file above as a starting point; your own pack only needs the values it changes, e.g. { "experience": { "enabled": true } }. - /dnd info settings shows, in game, every value that differs from the default and which pack set it. - If several packs have this file, they are merged key by key in the world's data pack order: the highest pack wins for the keys it sets, and keys no pack sets keep their default. - An invalid file (a value out of range, a typo in a value) is skipped as a whole: the server log names the pack and says why, and the other files still apply.

Translations

Put one file per language in data/<namespace>/lang/, named with Minecraft's language codes (en_us, it_it, es_es, fr_fr, de_de, ...). Same format as a resource pack lang file:

data/my_campaign/lang/en_us.json

{
  "item.my_campaign.flame_sword": "Flame Sword",
  "item.my_campaign.flame_sword.lore": "Forged in the Plane of Fire",
  "enchantment.my_campaign.holy_strike": "Holy Strike"
}

data/my_campaign/lang/it_it.json

{
  "item.my_campaign.flame_sword": "Spada Fiammeggiante",
  "item.my_campaign.flame_sword.lore": "Forgiata nel Piano del Fuoco",
  "enchantment.my_campaign.holy_strike": "Colpo Sacro"
}

  • Each player sees their own language (Options → Language). Missing keys fall back to en_us, then to the fallback text in the item/enchantment JSON.
  • Datapacks normally can't carry translations: MineDnD loads these on the server and sends them to every player with the mod, so a single datapack holds everything. /reload updates them live.
  • Key names are up to you; the convention is item.<namespace>.<name> and enchantment.<namespace>.<name>.
  • Any text component can use these keys, e.g. /tellraw @a {"translate":"my_campaign.quest.intro"}.

Reloading

Change How to apply it
Add or edit items or recipes /reload: the creative tab and recipe books update automatically (new unlock advancements apply from the next inventory change)
Add or edit translations /reload
Add or edit crafting requirements /reload
Change world settings /reload
Add or edit enchantments Restart the server (vanilla limitation)

Finding mistakes

A file with a mistake is skipped, and the game says why in its log:

Where you play The log
Singleplayer, Minecraft launcher .minecraft/logs/latest.log (the launcher's settings can also open the output window)
Modrinth App the instance → ⋯ → Open folder → logs/latest.log
Server the console, and logs/latest.log in the server folder

Search it for the file's name. What MineDnD reports:

Message Means
Skipping item <id>: <reason> The item file is wrong; <reason> names the field (e.g. No key id in MapLike, Value 120 outside of range)
Skipping crafting requirement <file>: <reason> A requirement rule is wrong
Skipping translation file <file>: <reason> A lang file isn't a flat list of "key": "text"
Skipping title <id>: <reason> A title is wrong
Skipping loot injection <id>: <reason> A loot injection is wrong (e.g. chance above 1, an empty tables)
Invalid minednd:settings.json in pack <pack>, skipped: <reason> The whole settings file of that pack is ignored
<file> is in the old gm_items folder: rename the folder to items A pack made for MineDnD before 0.3.0

Minecraft itself reports recipes, advancements, tags and enchantments (e.g. Couldn't parse data file … or Failed to parse …, with the file's id). A broken enchantment can stop a world from loading: in singleplayer the game offers to load it without the world's datapacks; fix the file and load it normally again.

Common problems:

Problem Look at
The pack isn't in /datapack list pack.mcmeta must be directly in the pack folder (or at the top of the zip), not one folder deeper
The pack is listed in red / "made for another version" min_format/max_format in pack.mcmeta: 121 for Minecraft 26.3
/dnd give says the item is unknown The id is the file's path (<namespace>:weapons/frost_blade), and the log may say why the file was skipped
The item shows item.my_campaign.frost_blade The translation key is missing: a typo in the key, or the lang file isn't in data/<namespace>/lang/
The recipe crafts nothing result.item doesn't match an item id; or a vanilla recipe uses the same shape
A rule does nothing The recipe or item id; place and use rules don't apply in creative (creative_exempt)
A change doesn't show /reload after saving; enchantments need the world to be reopened
Your change to a Default Content file is ignored Your pack must be above it (Load order), at exactly the same path

/dnd info is the quickest check: every pack in use, from the lowest to the highest priority, with how many items, enchantments, rules and recipes each adds and how many of its files a higher pack replaces.