All posts
August 7, 2026·4 min read

Building a Minecraft Data Pack by Hand: File Structure and Your First Recipe

How to build a data pack with no mods and no Java: what to put in pack.mcmeta, how the data folder is structured, where recipes and loot tables go, and why you need /reload after editing.

Half the ideas people reach for modding to build don't need Java or Forge at all. New recipes, different loot in chests, custom functions and events — all of that is a data pack: a set of text files.

A data pack runs in the vanilla game, needs nothing installed on players' end, and can be edited in a plain text editor.

Where it lives

A data pack goes inside a specific world:

.minecraft/saves/<world name>/datapacks/<datapack name>/

One important consequence follows from this: a data pack is tied to a world, not to the game. Want to use it in a different world — copy the folder.

pack.mcmeta

The only required file. It sits at the root of the data pack and describes it to the game:

{
  "pack": {
    "description": "My first data pack",
    "min_format": [88, 0],
    "max_format": [88, 0]
  }
}

min_format and max_format set the range of format versions the pack is compatible with. The numbers depend on the game version and change from release to release — this is the first thing to check if a pack isn't being picked up.

The version-declaration format has changed over time: older packs use a single pack_format field, and most guides online still show that. If you're copying an example from a three-year-old article and the game doesn't see your pack, this is almost certainly why.

The data folder structure

Everything else lives inside the data folder, organized by namespace:

data/<namespace>/<registry>/<path>.json

The namespace is usually your pack's own name, like mypack. It exists so your files don't clash with vanilla ones or with other packs.

The registry is what you're describing. The main ones:

  • recipe/ — crafting recipes;
  • loot_table/ — loot tables;
  • function/ — functions made of commands;
  • advancement/ — advancements;
  • tags/ — tags that group items and blocks together.

Note the singular folder names: recipe, not recipes. That's also changed between versions, and older guides get it wrong here too.

Your first recipe

The fastest way to confirm everything works is to make a recipe. File data/mypack/recipe/diamond_from_coal.json:

{
  "type": "minecraft:crafting_shaped",
  "pattern": [
    "CCC",
    "CCC",
    "CCC"
  ],
  "key": {
    "C": "minecraft:coal_block"
  },
  "result": {
    "id": "minecraft:diamond",
    "count": 1
  }
}

Nine coal blocks turn into a diamond. Questionable balance, but you can verify the result in ten seconds.

How to apply changes

You don't need to restart the game after editing files. This command is enough:

/reload

It re-reads recipes, loot tables, functions, advancements, predicates, and tags.

You can check whether a pack was even picked up with /datapack list. If your pack isn't in the enabled list, look for an error in pack.mcmeta or the folder structure. If it's there but the recipe doesn't work, the error is inside the JSON.

Where this gets tedious

One recipe is fun. Fifty is work.

JSON doesn't forgive small mistakes: an extra comma, the wrong kind of quote, a typo in an item identifier. The game will silently fail to load the file, sometimes the whole pack. Hunting for a typo across fifty files by eye is an evening gone.

There's also repetition. "Make the same recipes for every wood type" means eight nearly identical files that differ by one word. Copying by hand is tedious, and tedious work is exactly where mistakes creep in.

This is exactly where an agent with file access pays off: it generates a batch of files from a template, checks JSON validity across all of them at once, and finds typos in identifiers without you opening every single file. Doka works with the data pack's folder directly and can keep the model local instead of sending content to the cloud — it's free to download.

What a data pack can and can't do

Worth knowing the boundary so you don't waste a week.

A data pack can do: recipes, loot, villager trading, advancements, functions with commands, tags, structure generation in the world, custom dimensions.

A data pack can't do: new items and blocks with their own behavior, new mechanics, a custom interface, anything that needs code. That's the territory of Java mods.

Practical advice: start with a data pack regardless. If you hit a wall, move to a mod — but more often than not, you never hit that wall.

If a data pack is meant for a server, it goes into the world folder on the server, not on players' machines. For setting up the server itself, see the article on Forge servers with mods.