Automated Tree Planter

Watch little forest workers scurry across a field, planting glowing saplings that rapidly burst into a colourful forest with zero data packs.

Java EditionMobs & PetsMedium20 commandsTested on a real 26.2 & 26.3 server
Glowing entities roam a grassy field in Minecraft, automatically planting and growing small oak trees. Download the GIF Video & GIF © www.9minecraft.net

Custom MobsNatureCuteGreenOrangeYellowBuilding ToolDecorationItem displaysSummoned mobsBlock building (fill/setblock/clone)Rotation math13-20 commands

The Automated Tree Planter brings an entire self-planting woodland to life using pure vanilla commands. Little glowing forest workers scurry across the open grass, dropping magical saplings behind them as they roam.

Within seconds of being planted, each sapling swells with green particles and bursts upward into a full tree complete with oak trunks, lush leaf canopies, and glowing shroomlights. When the field fills up, the forest resets itself in a cloud of smoke so the planting cycle can run forever.

1. Setup - type these once 6 commands

  1. /scoreboard objectives add c9_t dummy
  2. /summon marker ~ ~ ~ {Tags:["c9_e","c9_ctrl"]}
  3. /summon rabbit ~4 ~ ~4 {Tags:["c9_e","c9_bot"],CustomName:{"text":"Sprout","color":"green"},Glowing:1b,Invulnerable:1b}
  4. /summon rabbit ~-4 ~ ~4 {Tags:["c9_e","c9_bot"],CustomName:{"text":"Bramble","color":"gold"},Glowing:1b,Invulnerable:1b}
  5. /summon rabbit ~4 ~ ~-4 {Tags:["c9_e","c9_bot"],CustomName:{"text":"Moss","color":"aqua"},Glowing:1b,Invulnerable:1b}
  6. /summon rabbit ~-4 ~ ~-4 {Tags:["c9_e","c9_bot"],CustomName:{"text":"Fern","color":"light_purple"},Glowing:1b,Invulnerable:1b}

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

  1. /scoreboard players add @e[tag=c9_e] c9_t 1
  2. /execute as @e[tag=c9_bot] at @s run particle happy_villager ~ ~0.4 ~ 0.2 0.2 0.2 0 1
  3. /execute as @e[tag=c9_bot] at @s unless block ~ ~-1 ~ grass_block run tp @s ~ ~ ~
  4. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 35.. run spreadplayers ~ ~ 3 11 false @e[tag=c9_bot]
  5. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 35.. at @e[tag=c9_bot] if block ~ ~ ~ air if block ~ ~-1 ~ grass_block run summon item_display ~ ~0.5 ~ {Tags:["c9_e","c9_seed"],Glowing:1b,item:{id:"minecraft:cherry_sapling",count:1}}
  6. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 35.. run scoreboard players set @e[tag=c9_ctrl] c9_t 0
  7. /execute at @e[tag=c9_seed,scores={c9_t=1}] run setblock ~ ~ ~ oak_sapling
  8. /execute at @e[tag=c9_seed] run particle composter ~ ~0.3 ~ 0.3 0.3 0.3 0 2
  9. /execute at @e[tag=c9_seed,scores={c9_t=40}] run fill ~-1 ~3 ~-1 ~1 ~5 ~1 azalea_leaves[persistent=true] replace air
  10. /execute at @e[tag=c9_seed,scores={c9_t=40}] run fill ~ ~ ~ ~ ~3 ~ oak_log
  11. /execute at @e[tag=c9_seed,scores={c9_t=40}] run setblock ~ ~4 ~ shroomlight
  12. /execute at @e[tag=c9_seed,scores={c9_t=40}] run particle totem_of_undying ~ ~2 ~ 0.8 1.5 0.8 0.15 35
  13. /execute at @e[tag=c9_seed,scores={c9_t=180}] run fill ~-1 ~ ~-1 ~1 ~5 ~1 air
  14. /kill @e[tag=c9_seed,scores={c9_t=180..}]

How it works

Frames from the test run

Automated Tree Planter - frame 1Automated Tree Planter - frame 2Automated Tree Planter - frame 3

Recorded on our own test server: 60 frames at about 9.8 fps. Our image check saw: Small glowing mobs with green particles roam a grassy area, leaving behind growing oak trees with blocky leaf canopies containing shroomlights.

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. Stand in the middle of a flat grass area with at least 15 blocks of open room around you.
  2. Run the 6 setup commands in chat to create the timer objective, the controller marker, and the 4 glowing rabbit workers.
  3. Place a line of 14 repeating command blocks set to Always Active, or 1 repeating command block feeding into 13 chain command blocks.
  4. Paste each loop command into the command blocks in order.
  5. Watch the rabbits hop around the grass leaving saplings that burst into glowing azalea trees.

Use it with real players

If you want trees to sprout behind real players as they walk instead of the rabbit workers, replace @e[tag=c9_bot] in the пятый loop command with @a and skip the /spreadplayers command.

Remove it again 6 commands

  1. /fill ~-15 ~ ~-15 ~15 ~8 ~15 air replace azalea_leaves
  2. /fill ~-15 ~ ~-15 ~15 ~8 ~15 air replace oak_log
  3. /fill ~-15 ~ ~-15 ~15 ~8 ~15 air replace shroomlight
  4. /fill ~-15 ~ ~-15 ~15 ~8 ~15 air replace oak_sapling
  5. /kill @e[tag=c9_e]
  6. /scoreboard objectives remove c9_t

FAQ

Why do the leaves have persistent=true in the fill command?

Adding persistent=true stops Minecraft from decaying the leaves if another tree overlaps or gets cleared nearby.

Can I make the trees stay permanent instead of disappearing?

Yes! Simply remove the second-to-last loop command that fills the tree area with air at score 180, and your forest will stay forever.

Commands used

/execute/fill/kill/particle/scoreboard/setblock/spreadplayers/summon/tp

Similar creations

Join 9Minecraft News & Guides