Minecraft Datapack Generator

A datapack is JSON in a folder, and the two things that break it are an out-of-date pack_format and a file in the wrong directory. Build the resources here, keep the pack_format matched to your target version, and copy each file into place.

Read the matching guide

Misode-style JSON resources

Data Pack

Loot Pool Entries

data/minecraft/loot_table/custom/example.json

Loot Table

{
  "type": "minecraft:generic",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "weight": 1,
          "name": "minecraft:diamond",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 1
            }
          ]
        },
        {
          "type": "minecraft:item",
          "weight": 3,
          "name": "minecraft:emerald",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 2
            }
          ]
        }
      ]
    }
  ]
}