Build a self-sustaining smart farm in Minecraft using command blocks where drones cast experience bottles and seeds to plant, grow, and harvest wheat.
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.
/scoreboard objectives add c9_tick dummy/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 stripped_oak_wood/fill ~-4 ~-1 ~-4 ~4 ~-1 ~4 farmland[moisture=7]/fill ~-4 ~ ~-4 ~4 ~ ~4 wheat[age=2]/setblock ~ ~-1 ~ water/setblock ~ ~ ~ composter[level=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}/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]}}/summon armor_stand ~ ~0.6 ~ {Tags:["c9_harvester","c9_ent"],NoGravity:1b,Invisible:1b,Glowing:1b,ArmorItems:[{},{},{},{id:"minecraft:hay_block",count:1}]}/summon text_display ~ ~3.4 ~ {Tags:["c9_label","c9_ent"],billboard:"center",background:1073741824,text:'{"text":"Autonomous Smart Farm","color":"gold","bold":true}'}/scoreboard players add #tick c9_tick 1/scoreboard players set #tick c9_tick 1/execute if score #tick c9_tick matches 1.. run scoreboard players add #clock c9_tick 1/execute if score #clock c9_tick matches 81.. run scoreboard players set #clock c9_tick 1/execute as @e[tag=c9_drone] at @s run tp @s ~ ~ ~ ~6 ~/execute as @e[tag=c9_harvester] at @s run tp @s ~ ~ ~ ~9 ~/execute at @e[tag=c9_drone] run particle end_rod ~ ~0.4 ~ 0.3 0.2 0.3 0.02 1 force/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]}/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]}/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]}/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]}/execute at @e[tag=c9_seed] run fill ~-1 ~-1 ~-1 ~1 ~1 ~1 wheat[age=2] replace air/execute at @e[tag=c9_bottle] run fill ~-2 ~-1 ~-2 ~2 ~1 ~2 wheat[age=7] replace wheat/execute at @e[tag=c9_harvester] positioned ^ ^ ^2.6 run particle happy_villager ~ ~0.2 ~ 0.6 0.2 0.6 0.05 4 forcesetup #3 Creates the 9x9 hydrated farmland bed surrounded by a stripped oak wood border, with a central water source and composter.setup #7 Summons the central Smart Farm Core drone above the composter, holding a glowing beacon block to dispense seeds and experience bottles.loop #9 Every 4 seconds on tick 30 and 70, the drone launches an experience bottle out over the crops to trigger instant growth.loop #12 Whenever a thrown seed item passes over empty air blocks above the farmland, it plants young wheat crops in a 3x3 area.loop #13 As the experience bottle flies and shatters over the garden, it upgrades nearby young wheat blocks directly to age 7 (fully grown).


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.
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.
/kill @e[tag=c9_ent]/kill @e[type=experience_orb,distance=..20]/scoreboard objectives remove c9_tick/fill ~-5 ~ ~-5 ~5 ~4 ~5 air/fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 grass_blockNo. 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.
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].
▶Automated Crop HarvesterSpawners & GeneratorsMedium24 cmds
▶Reverse Lawn Care ContraptionSpawners & GeneratorsEasy24 cmds
▶Tesla Coil Lightning Arc SpawnerSpawners & GeneratorsMedium24 cmds
▶3D Conveyor Belt LoopSpawners & GeneratorsMedium26 cmds
▶Automated Conveyor AssemblySpawners & GeneratorsEasy24 cmds
▶Automated Conveyor FactorySpawners & GeneratorsEasy24 cmds