Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Tree definition

From SAS Gaming Wiki
Revision as of 11:11, 30 June 2026 by SyncBot (talk | contribs) (Sync: new page from Minecraft)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Exclusive Minecraft:Trees are features with a stem and leaves, and optionally roots and decorations. They are configured using Minecraft:configured features in Minecraft:data packs.

JSON format

<section begin="json_format" />

<section end="json_format" />

Default below trunk provider

When not specified the below trunk provider defaults to the following Minecraft:rule-based block state provider: <syntaxhighlight lang="json"> {

   "rules": [
       {
           "if_true": {
               "type": "minecraft:not",
               "predicate": {
                   "type": "minecraft:matching_block_tag",
                   "tag": "minecraft:cannot_replace_below_tree_trunk"
               }
           },
           "then": {
               "type": "minecraft:simple_state_provider",
               "state": {
                   "Name": "minecraft:dirt"
               }
           }
       }
   ]

} </syntaxhighlight>

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.

  • Template:Nbt
    • Template:Nbt One of two_layers_feature_size or three_layers_feature_size
    • Template:Nbt (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 Template:Nbt, see below.

two_layers_feature_size

Specifies 2 different width based on height. At heights lower than Template:Nbt, Template:Nbt is used, otherwise Template:Nbt.

  • Additional fields:
    • Template:Nbt (optional, defaults to 1) Value between 0 and 81 (inclusive). The limit between lower and upper layer.
    • Template:Nbt (optional, defaults to 0) Value between 0 and 16 (inclusive). Minimum width of the tree at heights under Template:Nbt.
    • Template:Nbt (optional, defaults to 1) Value between 0 and 16 (inclusive). Minimum width of the tree at heights greater than or equals Template:Nbt.

three_layers_feature_size

Specifies 3 different width based on height. At heights lower than Template:Nbt, the minimum width is Template:Nbt, at the topmost Template:Nbt of the trunk Template:Nbt is used, otherwise Template:Nbt is used.

  • Additional fields:
    • Template:Nbt (optional, defaults to 1) Value between 0 and 80 (inclusive). Height of the lower layer, calculated from the bottom of the trunk.
    • Template:Nbt (optional, defaults to 1) Value between 0 and 80 (inclusive). Height of the upper layer, calculated from the top of the trunk.
    • Template:Nbt (optional. defaults to 0) Value between 0 and 16 (inclusive). Minimum width of the tree in the bottom layer (i.e. the bottom Template:Nbt blocks of the trunk).
    • Template:Nbt (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).
    • Template:Nbt (optional, defaults to 1) Value between 0 and 16 (inclusive). Minimum width of the tree in the upper layer (i.e. the topmost Template:Nbt blocks of the trunk).

Trunk placer

The trunk placer determines the shape trunk of the tree.

  • Template:Nbt
    • Template:Nbt 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, or cherry_trunk_placer.
    • Template:Nbt Value between 0 and 32 (inclusive). The base height of the trunk.
    • Template:Nbt Value between 0 and 24 (inclusive). A random value between 0 and this value (inclusive) is added to the height of the trunk.
    • Template:Nbt 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 Template:Nbt, see below.
Trunk placers
Name Description and Additional Fields
File:Straight trunk placer.png straight_trunk_placer Places a straight trunk of specified height. Foliage is attached to be block above the highest trunk block.

No additional fields

File:Forking trunk placer.png forking_trunk_placer Places a trunk with 1 or 2 branches, with an overhang of 1 to 3 blocks. Foliage is attached to the top of each branch.

No additional fields

File:Giant trunk placer.png 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

File:Mega jungle trunk placer.png 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

File:Dark oak trunk placer.png 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

File:Fancy trunk placer.png fancy_trunk_placer Places a straight trunk of (height + 2) * 0.618 and branches in random directions. Foliage is attached to the end of all branches that are at least 20% up the tree.

No additional fields

File:Bending trunk placer.png 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 Template:NbtTemplate:Nbt is generated. Foliage is attached to all block of the top branch and any trunk block that is higher than Template:Nbt.
File:Upwards branching trunk placer.png upwards_branching_trunk_placer Template:Info needed
File:Cherry trunk placer.png cherry_trunk_placer Template:Info needed

Foliage placer

Template:Info needed section The foliage placer determines the placement and shape of the foliage of the tree.

Foliage placers
Name Description and Additional Fields
File:Blob foliage placer.png blob_foliage_placer Template:Info needed
  • Additional fields:
    • Template:Nbt The foliage's height. Value between 0 and 16 (inclusive).
File:Bush foliage placer.png bush_foliage_placer Template:Info needed
  • Additional fields:
    • Template:Nbt The foliage's height. Value between 0 and 16 (inclusive).
File:Fancy foliage placer.png fancy_foliage_placer Template:Info needed
  • Additional fields:
    • Template:Nbt The foliage's height. Value between 0 and 16 (inclusive).
File:Jungle foliage placer.png jungle_foliage_placer Template:Info needed
  • Additional fields:
    • Template:Nbt The foliage's height. Value between 0 and 16 (inclusive).
File:Spruce foliage placer.png spruce_foliage_placer Places cones starting from the top of the trunk + offset, with increasing radius that increases until it hits a maximum radius, where it will keep generating frustums at maximum radius until the foliage is trunk_height + 1 tall
File:Pine foliage placer.png pine_foliage_placer Template:Info needed
File:Mega pine foliage placer.png mega_pine_foliage_placer Template:Info needed
File:Random spread foliage placer.png random_spread_foliage_placer Template:Info needed
File:Cherry foliage placer.png cherry_foliage_placer Template:Info needed
File:Acacia foliage placer.png acacia_foliage_placer Template:Info needed

No additional fields.

File:Dark oak foliage placer.png dark_oak_foliage_placer Template:Info needed

No additional fields.

Root placer

The root placer is optional and controls the placement and shape of the roots, and moving the trunk upwards.

Root placers
Name Description and Additional Fields
File:Mangrove root placer.png mangrove_root_placer Template:Info needed

Decorator

Decorators are used to add additional blocks to various parts of the tree.

  • Template:Nbt: A decorator.
    • Template:Nbt 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, or trunk_vine.
    • Additional fields depend on the value of Template:Nbt, see below.
Tree decorators
Name Description and Additional Fields
File:Alter ground tree decorator.png alter_ground Replaces blocks in the Template:Tag link tag around the tree with different blocks.
File:Attached to leaves tree decorator.png attached_to_leaves Attaches blocks to exposed faces of all foliage blocks in specified directions.
File:Attached to logs tree decorator.png attached_to_logs Attaches blocks to exposed faces of all trunk blocks in specified directions.
File:Beehive tree decorator.png beehive Places a single Minecraft:beehive with the specified probability. The beehive is always located 1 block below the lowest leaves block, but possibly on a different branch.
  • Additional fields:
File:Cocoa tree decorator.png cocoa Places Minecraft: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.
  • Additional fields:
    • Template:Nbt Value between 0.0 and 1.0 (inclusive). Probability that this feature places any cocoa beans.
File:Creaking heart tree decorator.png creaking_heart Places a creaking heart, replacing a trunk block in a position where all 6 surrounding blocks are in the Template:Tag link tag.
  • Additional fields:
File:Leave vine tree decorator.png leave_vine Places Minecraft:vines attached to any foliage blocks. Each vine is extended by 4 blocks downwards if possible.
  • Additional fields:
    • Template:Nbt Value between 0.0 and 1.0 (inclusive). Probability of placing a vine at any given position.
File:Pale moss tree decorator.png pale_moss Places the Template:Cd Minecraft:configured feature at the position of the lowest log with probability Template:Nbt.

Adds Minecraft:hanging moss to the bottom of trunk and foliage blocks with probability Template:Nbt and Template:Nbt respectively.

File:Place on ground tree decorator.png place_on_ground Tries Template:Nbt positions within the specified radius and height range to find a position that is at the height of the MOTION_BLOCKING_NO_LEAVES Minecraft:heightmap, is solid, and has air above. Places the specified block on the block above any matching positions.
File:Trunk vine tree decorator.png trunk_vine Adds vines to each side of each trunk block with a probability of 75% each.

No additional fields.

History

Template:HistoryTable

Navigation

Template:Navbox Java Edition technical