> ## Documentation Index
> Fetch the complete documentation index at: https://items.lodemc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Trees: what they're made of and how they grow

> Build trees from your own or vanilla log and leaves blocks, grown from a sapling, from a command or in new chunks, shaped procedurally or from schematics.

A tree is a [flora](https://items.lodemc.net/flora.md) entry with a `tree:` section. It has no item of its own: it grows from a [sapling](https://items.lodemc.net/flora/saplings.md), from new chunks if you let it [generate](https://items.lodemc.net/flora/tree-generation.md), or from `/lodeitems tree`.

A tree takes three things you already know how to make, plus the tree itself:

* a **log** and **leaves**, which are plain [blocks](https://items.lodemc.net/blocks.md): your own, or any vanilla block such as `oak_log` and `cherry_leaves`;
* a **sapling** (`type: flora` with `sapling:`), if players should be able to grow it;
* the **tree** (`type: flora` with `tree:`), which says what it's made of and how it's shaped.

```yaml items/flora/willow/willow.yml theme={null}
willow_log:
  type: block
  name: "<#8B6F4E>Willow Log"
  textures:
    top: willow_log_top.png
    side: willow_log.png
  rotation: axis              # lies along the way it's placed, like logs
  hardness: 2
  tool: axe

willow_leaves:
  type: block
  name: "<#7FA650>Willow Leaves"
  texture: willow_leaves.png
  transparent: true           # see-through, like leaves
  hardness: 0.2
  tool: hoe

willow_sapling:
  type: flora
  name: "<#7FA650>Willow Sapling"
  texture: willow_sapling.png
  sapling: {}

willow:
  type: flora
  tree:
    sapling: willow_sapling   # grows from it
    log: willow_log
    leaves: willow_leaves
    height: 7..11
    trunk-width-bottom: 2
    lean: 0.3
    branchiness: 0.5
    leaf-fluffiness: 0.7
    canopy: weeping
```

Wherever a tree names a block (`log`, `leaves`, the targets of `replace`), a bare name means a Lode Items block first, then a vanilla one. A vanilla block can carry properties: `oak_leaves[persistent=true]`.

## Two ways to shape a tree

> **[Procedural](https://items.lodemc.net/flora/procedural-trees.md)**
>
> Made up fresh each time from your settings: height, trunk width, lean, branches, leaves and crown shape.

> **[From schematics](https://items.lodemc.net/flora/schematic-trees.md)**
>
> Your own builds, saved with WorldEdit or a structure block, with blocks swapped as it grows.

A tree is procedural unless it has `schematics:`.

## How a tree grows

When a sapling grows, a tree generates or you use `/lodeitems tree`, the tree is planned first, then placed:

* **It only grows if its trunk and branches have room.** Wood may replace air, plants, leaves, walk-through and see-through Lode Items blocks, and the sapling itself. If anything else is in the way, nothing is placed and the sapling stays and tries again later.
* **Leaves only go where there is room**: air and plants. They never replace other blocks.
* **Vanilla leaves get their real distance to the wood**, so they decay when the tree is cut down, just like natural ones. Leaves that would be too far from any wood to stay are left out.

> [!TIP]
>
> Vanilla leaves only count logs in the `#minecraft:logs` tag as wood. If you put vanilla leaves on one of your own logs, give the log `tags: [logs]`, or its leaves decay as soon as something next to them changes.

## Trying a tree out

```text theme={null}
/lodeitems tree willow ~ ~ ~
```

Grows the tree with its trunk's base at that spot, with no sapling or soil needed. Use it to tune a tree's settings: change them, `/lodeitems reload`, and grow another.

## Not yet supported

* Your own leaves blocks never decay, even when the tree is cut down. Vanilla leaves do.
* Protection plugins can't stop a sapling growing a tree into the area they protect.
* 2x2 saplings that grow giant trees, like dark oak and jungle saplings.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.