Instant Procedural Tree Grower

Turn a single oak sapling into an animated giant custom tree with spreading surface roots, glowing builder probes, and flowering leaves.

Java EditionComplex Contraptions & CinematicsHard23 commandsTested on a real 26.2 & 26.3 server
Glowing green and orange builder guides procedurally construct a large tree with wooden roots. Download the GIF Video & GIF © www.9minecraft.net

Self-building StructuresNatureMysticGreenPinkOrangeBuilding ToolDecorationMap MakingBlock displaysBlock building (fill/setblock/clone)Rotation math21+ commands

Planting a sapling and waiting for bone meal is fine, but watching a giant tree construct itself block by block is much more rewarding. This command creation turns an ordinary oak sapling into an animated, procedural tree right before your eyes.

Once triggered, glowing builder guides shoot upward and outward from the sapling, carving rooted dirt trenches into the grass, raising a thick swirling oak trunk, and extending curved branches that bloom with flowering azalea leaves and falling petals.

1. Setup - type these once 9 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /setblock ~ ~ ~ oak_sapling
  3. /summon marker ~ ~ ~ {Tags:["c9_ent","c9_ctrl"]}
  4. /scoreboard players set @e[tag=c9_ctrl] c9_tick 0
  5. /summon block_display ~-0.5 ~ ~-0.5 {Tags:["c9_ent","c9_trunk"],Glowing:1b,glow_color_override:65280,block_state:{Name:"minecraft:oak_wood"}}
  6. /summon block_display ~-0.5 ~ ~-0.5 {Tags:["c9_ent","c9_root"],Rotation:[0f,6f],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:rooted_dirt"}}
  7. /summon block_display ~-0.5 ~ ~-0.5 {Tags:["c9_ent","c9_root"],Rotation:[90f,6f],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:rooted_dirt"}}
  8. /summon block_display ~-0.5 ~ ~-0.5 {Tags:["c9_ent","c9_root"],Rotation:[180f,6f],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:rooted_dirt"}}
  9. /summon block_display ~-0.5 ~ ~-0.5 {Tags:["c9_ent","c9_root"],Rotation:[270f,6f],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:rooted_dirt"}}

2. Loop - one repeating command block each (Always Active) 14 commands

  1. /execute as @e[tag=c9_ctrl] run scoreboard players add @s c9_tick 1
  2. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=1..25}] run particle happy_villager ~ ~1 ~ 0.8 0.8 0.8 0 12 force
  3. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=15..65}] as @e[tag=c9_root] at @s run tp @s ^ ^ ^0.18 ~3.5 ~
  4. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=15..65}] at @e[tag=c9_root] run fill ~-1 ~-1 ~-1 ~1 ~ ~1 rooted_dirt replace grass_block
  5. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=15..55}] at @e[tag=c9_root] run setblock ~ ~ ~ oak_wood
  6. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=15..85}] as @e[tag=c9_trunk] at @s run tp @s ~ ~0.16 ~ ~18 ~
  7. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=15..85}] at @e[tag=c9_trunk] run fill ~-1 ~ ~-1 ~1 ~ ~1 oak_wood
  8. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=15..85}] at @e[tag=c9_trunk] run particle happy_villager ~ ~1 ~ 1.5 0.5 1.5 0 8 force
  9. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=45..85}] at @e[tag=c9_trunk] run summon block_display ~ ~ ~ {Tags:["c9_ent","c9_branch"],Glowing:1b,glow_color_override:65280,block_state:{Name:"minecraft:azalea_leaves"}}
  10. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=45..85}] at @e[tag=c9_trunk] as @e[tag=c9_branch,tag=!c9_aim] run tp @s ~ ~ ~ ~67.5 -22
  11. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=45..85}] as @e[tag=c9_branch,tag=!c9_aim] run tag @s add c9_aim
  12. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=46..115}] as @e[tag=c9_branch] at @s run tp @s ^ ^ ^0.22 ~4 ~0.5
  13. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=46..108}] at @e[tag=c9_branch] run setblock ~ ~ ~ oak_wood
  14. /execute if entity @e[tag=c9_ctrl,scores={c9_tick=75..118}] at @e[tag=c9_branch] run fill ~-2 ~ ~-2 ~2 ~1 ~2 flowering_azalea_leaves[persistent=true] replace air

How it works

Frames from the test run

Instant Procedural Tree Grower - frame 1Instant Procedural Tree Grower - frame 2Instant Procedural Tree Grower - frame 3

Recorded on our own test server: 52 frames at about 8.6 fps. Our image check saw: A large tree with flowering azalea leaves, dirt roots, and glowing green and orange builder guides constructing it.

Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.

Build it in your world

  1. Choose an open flat area with grass blocks and place a command block at the spot where you want the tree to grow.
  2. Run the 9 setup commands once in chat or from an impulse command block chain while standing at the centre spot.
  3. Place 14 repeating command blocks (or 1 repeating followed by 13 chain command blocks), all set to Always Active.
  4. Paste the 14 loop commands into the block chain in order.
  5. Watch the glowing root and trunk builders carve rooted dirt into the grass, raise the oak trunk, and bloom flowering leaves.
  6. When the tree finishes growing after about 6 seconds, run the remove commands to clean up the helper entities while keeping your new tree.

Use it with real players

To trigger a procedural tree anywhere you drop a bone meal near an oak sapling, summon the setup entities at @e[type=item,nbt={Item:{id:"minecraft:bone_meal"}}] whenever a sapling is detected nearby with execute at @e[type=item] if block ~ ~ ~ oak_sapling, then kill the bone meal item.

Remove it again 4 commands

  1. /kill @e[tag=c9_ent]
  2. /scoreboard objectives remove c9_tick
  3. /fill ~-12 ~ ~-12 ~12 ~22 ~12 air
  4. /fill ~-12 ~-1 ~-12 ~12 ~-1 ~12 grass_block

FAQ

Will the leaves decay after the tree finishes growing?

No. The leaf command uses the block state [persistent=true], which tells Minecraft to keep the leaves permanently even if they are far from wood blocks.

How can I change the shape or height of the tree?

Increase the tick range on the c9_trunk movement commands (currently 15..85) to make the trunk taller, or adjust the pitch angle in loop command 12 to make the branches curve higher or lower.

Commands used

/execute/fill/particle/scoreboard/setblock/summon/tag/tp

Similar creations

Join 9Minecraft News & Guides