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.
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:
- Place the datapack in the
datapacks
folder of your world save.
- Run
/reload
in the game to load the datapack.
- Use
/datapack list
to ensure your datapack is loaded.
- Check the logs for errors if something doesn't work as expected.
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:
- Advancements: Add advancements in
data/your_namespace/advancements
for player achievements.
- Loot Tables: Define custom loot tables in
data/your_namespace/loot_tables
.
- Tags: Use tags for grouping items, blocks, or entities in
data/minecraft/tags
.