Tree definition
Trees are features with a stem and leaves, and optionally roots and decorations. They are configured using configured features in data packs.
JSON format
- [NBT Compound / JSON Object]: Root object.
- [String] type:
minecraft:tree - [NBT Compound / JSON Object] config
- [Boolean] ignore_vines (optional, defaults to false) Allows the tree to generate even if there are vines blocking it.
- [Boolean] force_dirt (optional, defaults to false) If true, places the dirt provider even when the block below the tree is a valid dirt-like block.
- [NBT Compound / JSON Object] dirt_provider The block to place below the trunk. Places only if
force_dirtis true, or if there is not a valid dirt-like block below the trunk.- Block state provider see Template:Nbt inherit/block state provider/template
- [NBT Compound / JSON Object] trunk_provider The block to use for the trunk. Note that when the trunk placer is
fancy_trunk_placer, the block must haveaxisproperty, such as logs.- Block state provider see Template:Nbt inherit/block state provider/template
- [NBT Compound / JSON Object] foliage_provider The block to use for the foliage.
- Block state provider see Template:Nbt inherit/block state provider/template
- [NBT Compound / JSON Object] minimum_size Defines the width of the tree at different heights relative to the lowest trunk block, for the minimum size of the feature, see Tree definition § Minimum size
- [NBT Compound / JSON Object] trunk_placer Defines how the trunk is generated, see Tree definition § Trunk placer
- [NBT Compound / JSON Object] foliage_placer Defines how the foliage is generated, see Tree definition § Foliage placer
- [NBT Compound / JSON Object] root_placer (optional) Controls how roots are generated, and which blocks to use, see Tree definition § Root placer
- [NBT List / JSON Array] decorators (Required, but can be empty) Decorations to add to the tree apart from the trunk and leaves.
- [NBT Compound / JSON Object] A decorator, see Tree definition § Decorator
- [String] type:
Minimum size
The minimum size determines how much space needs to be available for the tree to be able to place. This is done by checking a square area of varying widths at each vertical position of the tree. The available free height is calculated as the height until all square are free.
- [NBT Compound / JSON Object] minimum_size
- [String] type One of
two_layers_feature_sizeorthree_layers_feature_size - [Float] min_clipped_height (optional) Value between 0 and 80 (inclusive). If specified and lower than the trunk height, specifies the minimum free height required for the tree to generate. Otherwise the trunk height is used instead.
- Additional fields depend on the value of [String] type, see below.
- [String] type One of
two_layers_feature_size
Specifies 2 different width based on height. At heights lower than [Int] limit, [Int] lower_size is used, otherwise [Int] upper_size.
- Additional fields:
- [Int] limit (optional, defaults to 1) Value between 0 and 81 (inclusive). The limit between lower and upper layer.
- [Int] lower_size (optional, defaults to 0) Value between 0 and 16 (inclusive). Minimum width of the tree at heights under [Int] limit.
- [Int] upper_size (optional, defaults to 1) Value between 0 and 16 (inclusive). Minimum width of the tree at heights greater than or equals [Int] limit.
three_layers_feature_size
Specifies 3 different width based on height. At heights lower than [Int] limit, the minimum width is [Int] lower_size, at the topmost [Int] upper_limit of the trunk [Int] upper_size is used, otherwise [Int] middle_size is used.
- Additional fields:
- [Int] limit (optional, defaults to 1) Value between 0 and 80 (inclusive). Height of the lower layer, calculated from the bottom of the trunk.
- [Int] upper_limit (optional, defaults to 1) Value between 0 and 80 (inclusive). Height of the upper layer, calculated from the top of the trunk.
- [Int] lower_size (optional. defaults to 0) Value between 0 and 16 (inclusive). Minimum width of the tree in the bottom layer (i.e. the bottom [Int] limit blocks of the trunk).
- [Int] middle_size (optional, defaults to 1) Value between 0 and 16 (inclusive). Minimum width of the tree at the middle layer (i.e. between bottom and top layers).
- [Int] upper_size (optional, defaults to 1) Value between 0 and 16 (inclusive). Minimum width of the tree in the upper layer (i.e. the topmost [Int] upper_limit blocks of the trunk).
Trunk placer
The trunk placer determines the shape trunk of the tree.
- [NBT Compound / JSON Object] trunk_placer
- [String] type One of
straight_trunk_placer,forking_trunk_placer,giant_trunk_placer,mega_jungle_trunk_placer,dark_oak_trunk_placer,fancy_trunk_placer,bending_trunk_placer,upwards_branching_trunk_placer, orcherry_trunk_placer. - [Int] base_height Value between 0 and 32 (inclusive). The base height of the trunk.
- [Int] height_rand_a Value between 0 and 24 (inclusive). A random value between 0 and this value (inclusive) is added to the height of the trunk.
- [Int] height_rand_b Value between 0 and 24 (inclusive). Another random value between 0 and this value (inclusive) is added to the height of the trunk.
- Additional fields depend on the value of [String] type, see below.
- [String] type One of
| Name | Description and Additional Fields | |
|---|---|---|
straight_trunk_placer
|
Places a straight trunk of specified height. Foliage is attached to be block above the highest trunk block.
No additional fields | |
forking_trunk_placer
|
Places a trunk with 1 or 2 branches, with an overhang of 1 to 3 blocks. Foliage it attached to the top of each branch.
No additional fields | |
giant_trunk_placer
|
Places a 2×2 trunk of the specified height, except the topmost block is only a single block. Foliage is attached to be block above the highest trunk block.
No additional fields | |
![]() |
mega_jungle_trunk_placer
|
Extends the giant_trunk_placer with branches of length 5 in random directions in the top half of the trunk. Foliage is additionally attached to the end of each branch.
No additional fields |
![]() |
dark_oak_trunk_placer
|
Places a 2×2 trunk of the specified height. Additionally places columns of branches in a 4×4 area around the stem in the topmost 5 blocks of the trunk. Foliage is attached to the top of the trunk as well as the top of each branch.
No additional fields |
![]() |
fancy_trunk_placer
|
Places a straight trunk of (height + 2) * 0.618 and branches in random directions. Foliage it attached to the end of all branches that are at least 20% up the tree.
No additional fields |
![]() |
bending_trunk_placer
|
Places a trunk of the specified height. The topmost 2 blocks have a chance to be moved by one block each. On top of the trunk a straight branch of length [Int][NBT Compound / JSON Object] bend_length is generated. Foliage is attached to all block of the top branch and any trunk block that is higher than [Int] min_height_for_leaves.
|
![]() |
upwards_branching_trunk_placer
|
|
![]() |
cherry_trunk_placer
|
|
Foliage placer
The foliage placer determines the placement and shape of the foliage of the tree.
- [NBT Compound / JSON Object] foliage_placer
- [String] type One of
blob_foliage_placer,spruce_foliage_placer,pine_foliage_placer,acacia_foliage_placer,bush_foliage_placer,fancy_foliage_placer,jungle_foliage_placer,mega_pine_foliage_placer,dark_oak_foliage_placer,random_spread_foliage_placer, orcherry_foliage_placer. - [Int][NBT Compound / JSON Object] radius The radius of the foliage.
- Int provider see Template:Nbt inherit/int_provider/template
- [Int][NBT Compound / JSON Object] offset The vertical offset from the top of trunk to the top of the foliage.
- Int provider see Template:Nbt inherit/int_provider/template
- Additional fields depend on the value of [String] type, see below.
- [String] type One of
| Name | Description and Additional Fields | |
|---|---|---|
![]() |
blob_foliage_placer
|
|
![]() |
bush_foliage_placer
|
|
![]() |
fancy_foliage_placer
|
|
![]() |
jungle_foliage_placer
|
|
![]() |
spruce_foliage_placer
|
|
![]() |
pine_foliage_placer
|
|
![]() |
mega_pine_foliage_placer
|
|
![]() |
random_spread_foliage_placer
|
|
![]() |
cherry_foliage_placer
|
|
![]() |
acacia_foliage_placer
|
No additional fields. |
![]() |
dark_oak_foliage_placer
|
No additional fields. |
Root placer
The root placer is optional and controls the placement and shape of the roots, and moving the trunk upwards.
- [NBT Compound / JSON Object] root_placer
- [String] type Type of tree root placer, currently only
mangrove_root_placer. - [NBT Compound / JSON Object] root_provider The block used as the root of the tree.
- Block state provider see Template:Nbt inherit/block state provider/template
- [Int][NBT Compound / JSON Object] trunk_offset_y Offset perpendicular to the trunk.
- Int provider see Template:Nbt inherit/int_provider/template
- [NBT Compound / JSON Object] above_root_placement (optional) The blocks above the root.
- [NBT Compound / JSON Object] above_root_provider The block above the root.
- Block state provider see Template:Nbt inherit/block state provider/template
- [Float] above_root_placement_chance The probability of generating the block. Value between 0.0 and 1.0 (inclusive).
- [NBT Compound / JSON Object] above_root_provider The block above the root.
- Additional fields depend on the value of [String] type, see below.
- [String] type Type of tree root placer, currently only
| Name | Description and Additional Fields | |
|---|---|---|
![]() |
mangrove_root_placer
|
|
Decorator
Decorators are used to add additional blocks to various parts of the tree.
- [NBT Compound / JSON Object]: A decorator.
- [String] type The type of decoration to add. One of
alter_ground,attached_to_leaves,attached_to_logs,beehive,cocoa,creaking_heart,leave_vine,pale_moss,place_on_ground, ortrunk_vine. - Additional fields depend on the value of [String] type, see below.
- [String] type The type of decoration to add. One of
| Name | Description and Additional Fields | |
|---|---|---|
![]() |
alter_ground
|
Replaces blocks in the #minecraft:dirt tag around the tree with different blocks.
|
![]() |
attached_to_leaves
|
Attaches blocks to exposed faces of all foliage blocks in specified directions.
|
![]() |
attached_to_logs
|
Attaches blocks to exposed faces of all trunk blocks in specified directions.
|
![]() |
beehive
|
Places a single beehive with the specified probability. The beehive is always located 1 block below the lowest leaves block, but possibly on a different branch.
|
![]() |
cocoa
|
Places cocoa beans on the bottom 3 blocks of the trunk with a probability of 25% for each face. The specified probability determines how often any cocoa beans are placed.
|
![]() |
creaking_heart
|
Places a creaking heart, replacing a trunk block in a position where all 6 surrounding blocks are in the #minecraft:logs tag.
|
![]() |
leave_vine
|
Places vines attached to any foliage blocks. Each vine is extended by 4 blocks downwards if possible.
|
![]() |
pale_moss
|
Places the minecraft:pale_moss_patch configured feature at the position of the lowest log with probability [Float] ground_probability.
Adds hanging moss to the bottom of trunk and foliage blocks with probability [Float] trunk_probability and [Float] ground_probability respectively.
|
![]() |
place_on_ground
|
Tries [Int] tries positions within the specified radius and height range to find a position that is at the height of the MOTION_BLOCKING_NO_LEAVES heightmap, is solid, and has air above. Places the specified block on the block above any matching positions.
|
![]() |
trunk_vine
|
Adds vines to each side of each trunk block with a probability of 75% each.
No additional fields. |
History
| Java Edition | |||||||
|---|---|---|---|---|---|---|---|
| 1.16.2 | 20w28a | Trees can now be configured using data packs. | |||||
| 1.17 | 21w10a | Removed [Int] max_water_depth and [String] heightmap fields. | |||||
| Added [NBT Compound / JSON Object] dirt_provider and [Boolean] force_dirt | |||||||
| Renamed [NBT Compound / JSON Object] leaves_provider to [NBT Compound / JSON Object] foliage_provider | |||||||
Added random_spread_foliage_placer and bending_trunk_placer. | |||||||
| pre1 | Added [NBT Compound / JSON Object] sapling_provider field | ||||||
| 1.18 | 21w38a | Removed [NBT Compound / JSON Object] sapling_provider field | |||||
| 1.19 | 22w14a | Added [NBT Compound / JSON Object] root_placer field and the mangrove_root_placer.
| |||||
Added attached_to_leaves decorator.
| |||||||
Added [Float] probability field to the leave_vine decorator.
| |||||||
Added upwards_branching_trunk_placer. | |||||||
| 22w15a | Added [Int][NBT Compound / JSON Object] trunk_offset_y and [NBT Compound / JSON Object] above_root_placement fields to the root placer. | ||||||
Removed the [Int] y_offset field of the mangrove_root_placer. Moved all other additional fields of mangrove_root_placer into an object [NBT Compound / JSON Object] mangrove_root_placement. | |||||||
| 1.19.4 | 23w07a | Added cherry_foliage_placer and cherry_trunk_placer. | |||||
| 1.21.2 | 24w40a | Added pale_moss and creaking_heart decorators. | |||||
| 1.21.5 | 25w02a | Added place_on_ground decorator. | |||||
| 25w09a | Added attached_to_logs decorator. | ||||||
| |||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||



























