Skip to content

Tree Simulator Recipes ​

The Tree Simulator uses custom tree_simulator recipes to determine what a sapling produces and how long it takes to grow.

Auto-Generation ​

By default, a Tree Simulator recipe is automatically generated for every registered resource sapling. You do not need to create these files unless you want to customize the outputs.

The auto-generated recipe produces:

OutputChanceMin RollsMax Rolls
Log (matching tree type)30%11
Leaf Fragment100%11
Leaf Fragment (bonus)leafDropChance × 0.514
Sapling (same type)saplingDropChance11

Generator ​

Pick a sapling to load the drops the mod generates for it, then change them.

Sapling (tree)
Drops (drops)
30% per roll · about 0.3 per harvest
100% per roll · about 1 per harvest
12.5% per roll · about 0.31 per harvest
12.5% per roll · about 0.13 per harvest
Save asdata/resourcestrees/recipe/tree_simulator/iron_oak_sapling.json
{
  "type": "resourcestrees:tree_simulator",
  "tree": {
    "id": "resourcestrees:iron_oak_sapling",
    "count": 1
  },
  "ticksToGrow": 1200,
  "drops": [
    {
      "output": {
        "id": "minecraft:oak_log"
      },
      "chance": 0.3,
      "minRolls": 1,
      "maxRolls": 1
    },
    {
      "output": {
        "id": "resourcestrees:iron_leaf_fragment"
      },
      "chance": 1,
      "minRolls": 1,
      "maxRolls": 1
    },
    {
      "output": {
        "id": "resourcestrees:iron_leaf_fragment"
      },
      "chance": 0.125,
      "minRolls": 1,
      "maxRolls": 4
    },
    {
      "output": {
        "id": "resourcestrees:iron_oak_sapling"
      },
      "chance": 0.125,
      "minRolls": 1,
      "maxRolls": 1
    }
  ]
}
Put it in a datapack. It replaces the recipe the mod generates for this sapling. Fortune on the axe adds a roll to every drop.

Custom Recipe Format ​

To override the recipe for a specific sapling, place a JSON file at:

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

For example, to customize the iron_oak_sapling recipe:

data/resourcestrees/recipe/tree_simulator/iron_oak_sapling.json

JSON Format ​

json
{
  "type": "resourcestrees:tree_simulator",
  "tree": {
    "id": "resourcestrees:iron_oak_sapling",
    "count": 1
  },
  "ticksToGrow": 1200,
  "drops": [
    {
      "output": {
        "id": "minecraft:iron_ingot",
        "count": 1
      },
      "chance": 0.5,
      "minRolls": 1,
      "maxRolls": 3
    },
    {
      "output": {
        "id": "resourcestrees:iron_leaf_fragment",
        "count": 1
      },
      "chance": 1.0,
      "minRolls": 1,
      "maxRolls": 1
    }
  ]
}

Fields ​

FieldDescription
typeAlways "resourcestrees:tree_simulator"
treeThe sapling this recipe applies to (matched by item and components)
ticksToGrowBase ticks per harvest, before the axe multiplier. Lower is faster. The generated recipe uses the resource type's treeSimulatorTicks.
dropsList of output entries (see below)

Drop Entry Fields ​

FieldDescription
outputThe item to produce (uses ItemStackTemplate format: id + optional count and components)
chanceProbability (0.0–1.0) this drop occurs per roll
minRollsMinimum number of times to attempt this drop per harvest
maxRollsMaximum number of times to attempt this drop per harvest

Each harvest rolls a random number of times between minRolls and maxRolls (inclusive), plus one extra roll per level of Fortune on the axe. Every roll succeeds on its own chance.

Viewing Recipes In-Game ​

With JEI installed, Tree Simulator recipes have their own Tree Simulator category. Look up the Tree Simulator block's uses to browse them all, or try the Sapling Explorer for the generated ones.

All Rights Reserved.