Skip to content

Your first datapack

Open in AI chat

This walkthrough builds a working datapack in five steps: it adds a Burner Press recipe that presses a gold block into a diamond (an obviously new result, so it is easy to spot) and removes one of HBM’s press recipes. The same pack works on all six targets once the folder names match your Minecraft version.

  1. Make the pack folder. Open your world’s datapacks folder (saves/<world>/datapacks) and create a folder named my_hbm_pack. Everything below goes inside it. Use your own namespace (mypack here) for your files, never hbm.

  2. Write pack.mcmeta. The format number depends on the Minecraft version:

    pack.mcmeta
    {
    "pack": {
    "description": "My HBM tweaks",
    "min_format": 101,
    "max_format": 101
    }
    }
  3. Add the recipe. Machine recipes live in a subfolder named after the machine’s table, here press:

    • Directorymy_hbm_pack/
      • pack.mcmeta
      • Directorydata/
        • Directorymypack/
          • Directoryrecipe/
            • Directorypress/
              • diamond_from_gold.json
    data/mypack/recipe/press/diamond_from_gold.json
    {
    "type": "hbm:press",
    "stamp": "flat",
    "input": { "ingredient": "minecraft:gold_block" },
    "output": "minecraft:diamond"
    }

    stamp is the stamp the press needs: flat, plate, wire, circuit, c357, c44, c9, c50 or printing1 to printing8. input takes an item or a #tag, with an optional count; output is an item id or {"id", "count"}. The machine recipe JSON is the same on every version, including 1.20.1. The type field picks the table, so the subfolder name only keeps the recipe id readable (mypack:press/diamond_from_gold). Every field is on the press page.

  4. Remove an HBM recipe. Removals are a list of recipe ids in a recipe_removals folder of your own namespace. A machine recipe’s id is hbm:<table>/<file name>:

    data/mypack/recipe_removals/press.json
    {
    "recipes": ["hbm:press/ball_resin"]
    }

    This removes the press recipe that turns jungle logs into latex. Do not try to override HBM’s file by writing your own data/hbm/recipe/press/ball_resin.json: which pack wins is not reliable on every loader.

  5. Load it. Run /reload in the world (or restart it). Machine tables are re-read and synced to every client on reload. Run /datapack list and check that file/my_hbm_pack is enabled. Then put a flat stamp, a gold block and some fuel in a Burner Press: it presses a diamond once it has heated up. A jungle log with a flat stamp no longer gives latex.

  • /datapack list does not show the pack: pack.mcmeta is missing, misnamed or has the wrong keys for your version, or the files are one folder too deep (the pack folder must contain pack.mcmeta and data/ directly).
  • The pack is listed but the recipe is missing: check the folder name (recipe or recipes) for your version, and look in the game log for a recipe parsing error naming your file.
  • A JSON syntax error (a missing comma or quote) makes the game skip that one file. A JSON validator finds it fastest.

HBM’s recipes are generated at build time, so they are not in the source repository as JSON. To read them, open the NTM - Continuum jar with any zip tool and look under data/hbm/recipe/<table>/ (recipes/ on 1.20.1). They are the best examples for every table.