Autonomous Smart Farm Cycle

Build a self-sustaining smart farm in Minecraft using command blocks where drones cast experience bottles and seeds to plant, grow, and harvest wheat.

Java EditionMini-games & UtilitiesMedium24 commandsTested on a real 26.2 & 26.3 server
An automated Minecraft farm plot with a central hovering core tending to growing wheat crops. Download the GIF Video & GIF © www.9minecraft.net

Spawners & GeneratorsNatureTechnologyGreenYellowMap MakingDecorationItem displaysText displaysArmor standsSummoned mobsBlock building (fill/setblock/clone)Rotation math21+ commands

Traditional crop farming takes time, waiting for wheat to grow before replanting every block by hand. This command creation turns a 9x9 garden into an automated smart farm overseen by a hovering crystalline drone and an orbiting harvester beam.

In the demonstration, the central drone periodically tosses experience bottles and wheat seeds across the field. Wherever the seeds land, they plant young crops; when the experience bottles shatter, their magic accelerates the wheat to full maturity. A glowing golden collector orbits the field, automatically harvesting ripe wheat, sending batches floating up into the central core, and replanting the soil in an endless loop.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 stripped_oak_wood
  3. /fill ~-4 ~-1 ~-4 ~4 ~-1 ~4 farmland[moisture=7]
  4. /fill ~-4 ~ ~-4 ~4 ~ ~4 wheat[age=2]
  5. /setblock ~ ~-1 ~ water
  6. /setblock ~ ~ ~ composter[level=7]
  7. /summon armor_stand ~ ~1.8 ~ {Tags:["c9_drone","c9_ent"],NoGravity:1b,Invisible:1b,Glowing:1b,ArmorItems:[{},{},{},{id:"minecraft:beacon",count:1}],CustomName:'{"text":"Smart Farm Core","color":"aqua"}',CustomNameVisible:1b}
  8. /summon item_display ~ ~2.3 ~ {Tags:["c9_core_ring","c9_ent"],Glowing:1b,glow_color_override:65535,item:{id:"minecraft:heart_of_the_sea",count:1},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[1.3f,1.3f,1.3f]}}
  9. /summon armor_stand ~ ~0.6 ~ {Tags:["c9_harvester","c9_ent"],NoGravity:1b,Invisible:1b,Glowing:1b,ArmorItems:[{},{},{},{id:"minecraft:hay_block",count:1}]}
  10. /summon text_display ~ ~3.4 ~ {Tags:["c9_label","c9_ent"],billboard:"center",background:1073741824,text:'{"text":"Autonomous Smart Farm","color":"gold","bold":true}'}

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

  1. /scoreboard players add #tick c9_tick 1
  2. /scoreboard players set #tick c9_tick 1
  3. /execute if score #tick c9_tick matches 1.. run scoreboard players add #clock c9_tick 1
  4. /execute if score #clock c9_tick matches 81.. run scoreboard players set #clock c9_tick 1
  5. /execute as @e[tag=c9_drone] at @s run tp @s ~ ~ ~ ~6 ~
  6. /execute as @e[tag=c9_harvester] at @s run tp @s ~ ~ ~ ~9 ~
  7. /execute at @e[tag=c9_drone] run particle end_rod ~ ~0.4 ~ 0.3 0.2 0.3 0.02 1 force
  8. /execute at @e[tag=c9_drone] rotated ~ 0 if score #clock c9_tick matches 10 run summon item ~ ~0.4 ~ {Tags:["c9_seed","c9_ent"],Item:{id:"minecraft:wheat_seeds",count:1},PickupDelay:32767,Age:5940,Glowing:1b,Motion:[0.22,0.35,0.18]}
  9. /execute at @e[tag=c9_drone] rotated ~ 0 if score #clock c9_tick matches 30 run summon experience_bottle ~ ~0.5 ~ {Tags:["c9_bottle","c9_ent"],Motion:[-0.2,0.4,0.22]}
  10. /execute at @e[tag=c9_drone] rotated ~ 0 if score #clock c9_tick matches 50 run summon item ~ ~0.4 ~ {Tags:["c9_seed","c9_ent"],Item:{id:"minecraft:wheat_seeds",count:1},PickupDelay:32767,Age:5940,Glowing:1b,Motion:[0.18,0.35,-0.24]}
  11. /execute at @e[tag=c9_drone] rotated ~ 0 if score #clock c9_tick matches 70 run summon experience_bottle ~ ~0.5 ~ {Tags:["c9_bottle","c9_ent"],Motion:[-0.22,0.4,-0.18]}
  12. /execute at @e[tag=c9_seed] run fill ~-1 ~-1 ~-1 ~1 ~1 ~1 wheat[age=2] replace air
  13. /execute at @e[tag=c9_bottle] run fill ~-2 ~-1 ~-2 ~2 ~1 ~2 wheat[age=7] replace wheat
  14. /execute at @e[tag=c9_harvester] positioned ^ ^ ^2.6 run particle happy_villager ~ ~0.2 ~ 0.6 0.2 0.6 0.05 4 force

How it works

Frames from the test run

Autonomous Smart Farm Cycle - frame 1Autonomous Smart Farm Cycle - frame 2Autonomous Smart Farm Cycle - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A 9x9 farm plot split between mature wheat and glowing green seedlings with a central glowing drone entity emitting green particles and raw JSON nametags visible above 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. Find a flat area of at least 15x15 blocks and stand in the exact center block.
  2. Run each of the 10 setup commands in chat one by one to build the wooden border, farmland, crop bed, and central drone.
  3. Place a column or line of 14 Repeating Command Blocks nearby (set to Always Active).
  4. Paste one loop command into each repeating command block in order from 1 to 14.
  5. Watch the central core spin and toss glowing seeds and experience bottles to grow the crops automatically.

Use it with real players

To control the smart farm manually as a player instead of using the autonomous drone, remove the four summoning commands (loop commands 8 through 11) and tag any thrown seeds or bottles near you by running /execute at @a run tag @e[type=item,nbt={Item:{id:"minecraft:wheat_seeds"}},distance=..4] add c9_seed and /execute at @a run tag @e[type=experience_bottle,distance=..4] add c9_bottle in repeating command blocks. Whenever you toss seeds or splash XP bottles onto your farmland, they will instantly plant and mature the crops around where they land.

Remove it again 5 commands

  1. /kill @e[tag=c9_ent]
  2. /kill @e[type=experience_orb,distance=..20]
  3. /scoreboard objectives remove c9_tick
  4. /fill ~-5 ~ ~-5 ~5 ~4 ~5 air
  5. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 grass_block

FAQ

Will the thrown seeds or experience orbs lag my world over time?

No. The seed items spawn with an Age value of 5940, meaning they automatically despawn after 3 seconds (60 ticks), and the loop only spawns one item every second.

Can I change the crop from wheat to carrots or potatoes?

Yes! Replace wheat[age=2] and wheat[age=7] in the setup and loop commands with carrots[age=2] and carrots[age=7], or potatoes[age=2] and potatoes[age=7].

Commands used

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

Similar creations

Join 9Minecraft News & Guides