Developer Documentation

How to Create Farmer's Delight Compatibility Datapacks

This page explains how to create your own datapack. To learn how to download and use mine, visit the Documentation page.

Introduction

This guide explains how developers can create their own datapacks to add compatibility with Farmer's Delight. Follow the steps below to ensure your datapack integrates smoothly with Farmer's Delight's systems.

If you are interested in my datapack code, feel free to visit the Projects page to browse all available datapacks, search by name or tag, select a Minecraft version, and access links to CurseForge or Modrinth.

Creating the pack.mcmeta File

The pack.mcmeta file is required for all Minecraft datapacks. It contains metadata about your datapack, such as its description and version. Below is an example:

{
  "pack": {
    "pack_format": 15,
    "description": "Farmer's Delight compatibility for my mod."
  }
}

Save this file in the root directory of your datapack as pack.mcmeta.

Folder Structure

Ensure your datapack has the correct folder structure for Minecraft datapacks:

datapacks/
├── your_datapack_name/
│   ├── pack.mcmeta
│   ├── data/
│   │   ├── minecraft/
│   │   │   ├── tags/
│   │   │   │   ├── items/
│   │   │   │   │   └── compostable.json
│   │   ├── your_namespace/
│   │   │   ├── recipes/
│   │   │   │   └── your_recipe.json
            

Make sure the file is a .zip file

Writing Recipes

Create JSON files in the recipes folder to define custom recipes. Below are examples of Farmer's Delight compatibility:

Cooking Recipe

{
          "type": "farmersdelight:cooking",
          "ingredients": [
            { "item": "minecraft:potato" },
            { "item": "minecraft:carrot" }
          ],
          "result": {
            "item": "farmersdelight:vegetable_soup",
            "count": 1
          },
          "cookingtime": 200
        }

Cutting Recipe

Below is an example of a cutting recipe for the Farmer's Delight mod:

{
          "type": "farmersdelight:cutting",
          "ingredients": [
            {
              "item": "blue_skies:maple_log"
            }
          ],
          "result": [
            {
              "item": "blue_skies:maple_planks"
            }
          ],
          "sound": "minecraft:item.axe.strip",
          "tool": {
            "type": "farmersdelight:tool_action",
            "action": "axe_strip"
          }
        }

This recipe uses the Farmer's Delight cutting board to turn blue_skies:maple_log into blue_skies:maple_planks, playing a stripping sound when an axe is used. If you want to test this exact code, make sure to download Blue Skies and Farmer's Delight.

Adding Compostable Items

To add compatibility with the composter, create a compostable.json file under data/minecraft/tags/items:

{
  "replace": false,
  "values": [
    "your_namespace:your_item"
  ]
}

Testing and Debugging

After creating your datapack, test it in Minecraft:

Additional Resources

Here are some resources to help you learn more about Minecraft datapacks and Farmer's Delight:

Additional Notes

Here are some additional files you might include: