Skip to content

Sapling Recipes ​

The mod generates a crafting recipe for every sapling, so custom resource types and tree types get one automatically. A datapack can replace any of them.

The generated recipe ​

The resource type's material (M) around the tree type's vanilla sapling (S), for one resource sapling:

 M
MSM
 M
Shaped ➜ Iron Birch Sapling

Generated sapling recipes show up in the Misc tab of the recipe book.

Generator ​

Pick a sapling, then paint a new shape. Choose an ingredient on the left and click grid cells to place it; click a cell again to clear it.

Ingredients pick one, then click grid cells
D
O
➜Diamond Oak Sapling
Save asdata/resourcestrees/recipe/saplings/diamond_oak_sapling.json
{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "key": {
    "D": "minecraft:diamond_block",
    "O": "minecraft:oak_sapling"
  },
  "pattern": [
    " D ",
    "DOD",
    " D "
  ],
  "result": {
    "id": "resourcestrees:diamond_oak_sapling"
  }
}
Put it in a datapack. The mod then skips generating this sapling's recipe.

Replacing a recipe ​

Put a recipe at this path, named after the sapling:

data/resourcestrees/recipe/saplings/<sapling_name>.json

When a recipe with that id exists, the mod doesn't generate its own. For example, to make diamond_oak_sapling cost diamonds instead of diamond blocks:

data/resourcestrees/recipe/saplings/diamond_oak_sapling.json

json
{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "pattern": [
    "DDD",
    "DSD",
    "DDD"
  ],
  "key": {
    "D": "minecraft:diamond",
    "S": "minecraft:oak_sapling"
  },
  "result": {
    "id": "resourcestrees:diamond_oak_sapling"
  }
}
Shaped ➜ Diamond Oak Sapling

Any recipe type works, as long as the id matches, so the replacement can also be shapeless or come from another mod.

All Rights Reserved.