Autonomous Quarry Worker Crew

Watch four miniature armored workers autonomously walk around a stone and ore quarry, swing pickaxes, shatter blocks, and spark dust without any player input.

Java EditionMobs & PetsMedium24 commandsTested on a real 26.2 & 26.3 server
Four glowing miniature armor stand miners excavate stone, gold, and diamond ores on a deepslate pad. Download the GIF Video & GIF © www.9minecraft.net

Custom MobsIndustrialMedievalGoldCyanBlackDecorationMap MakingAdventure MapArmor standsBlock building (fill/setblock/clone)Rotation math21+ commands

Four miniature armored miners march around a layered outcrop of stone, gold ore, and diamond ore, swinging their pickaxes and carving tunnels entirely on their own. Golden dust sparks burst on every strike as blocks shatter into collectible drops on the deepslate quarry floor.

Once the outcrop is chipped away, the crew steps clear while the quarry stone automatically regenerates for nonstop mining action.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_t dummy
  2. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 cobbled_deepslate
  3. /fill ~-3 ~ ~-3 ~3 ~1 ~3 stone
  4. /fill ~-3 ~1 ~-1 ~3 ~1 ~1 gold_ore
  5. /fill ~-1 ~ ~-3 ~1 ~ ~3 diamond_ore
  6. /summon armor_stand ~-4.2 ~ ~-1 {Tags:["c9_w"],Small:1b,ShowArms:1b,NoBasePlate:1b,NoGravity:1b,Glowing:1b,Rotation:[-75.0f,0.0f],CustomName:{"text":"Miner Pip","color":"gold"},CustomNameVisible:1b,equipment:{head:{id:"minecraft:golden_helmet",count:1},chest:{id:"minecraft:iron_chestplate",count:1},legs:{id:"minecraft:iron_leggings",count:1},feet:{id:"minecraft:iron_boots",count:1},mainhand:{id:"minecraft:iron_pickaxe",count:1,components:{"minecraft:enchantments":{efficiency:3}}}}}
  7. /summon armor_stand ~4.2 ~ ~1 {Tags:["c9_w"],Small:1b,ShowArms:1b,NoBasePlate:1b,NoGravity:1b,Glowing:1b,Rotation:[105.0f,0.0f],CustomName:{"text":"Miner Brix","color":"aqua"},CustomNameVisible:1b,equipment:{head:{id:"minecraft:diamond_helmet",count:1},chest:{id:"minecraft:iron_chestplate",count:1},legs:{id:"minecraft:iron_leggings",count:1},feet:{id:"minecraft:iron_boots",count:1},mainhand:{id:"minecraft:diamond_pickaxe",count:1,components:{"minecraft:enchantments":{efficiency:3}}}}}
  8. /summon armor_stand ~1 ~ ~-4.2 {Tags:["c9_w"],Small:1b,ShowArms:1b,NoBasePlate:1b,NoGravity:1b,Glowing:1b,Rotation:[15.0f,0.0f],CustomName:{"text":"Miner Cole","color":"green"},CustomNameVisible:1b,equipment:{head:{id:"minecraft:iron_helmet",count:1},chest:{id:"minecraft:chainmail_chestplate",count:1},legs:{id:"minecraft:iron_leggings",count:1},feet:{id:"minecraft:iron_boots",count:1},mainhand:{id:"minecraft:iron_pickaxe",count:1}}}
  9. /summon armor_stand ~-1 ~ ~4.2 {Tags:["c9_w"],Small:1b,ShowArms:1b,NoBasePlate:1b,NoGravity:1b,Glowing:1b,Rotation:[-165.0f,0.0f],CustomName:{"text":"Miner Tug","color":"yellow"},CustomNameVisible:1b,equipment:{head:{id:"minecraft:turtle_helmet",count:1},chest:{id:"minecraft:golden_chestplate",count:1},legs:{id:"minecraft:iron_leggings",count:1},feet:{id:"minecraft:golden_boots",count:1},mainhand:{id:"minecraft:golden_pickaxe",count:1},offhand:{id:"minecraft:lantern",count:1}}}
  10. /summon marker ~ ~ ~ {Tags:["c9_ctrl"]}

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

  1. /scoreboard players add #tick c9_t 1
  2. /execute if score #tick c9_t matches 10.. run scoreboard players set #tick c9_t 0
  3. /scoreboard players add #regen c9_t 1
  4. /execute as @e[tag=c9_w] at @s if block ^ ^ ^0.9 air if block ^ ^1 ^0.9 air run tp @s ^ ^ ^0.09 ~1.2 ~
  5. /execute as @e[tag=c9_w,distance=4.5..] at @s run tp @s ~ ~ ~ facing entity @e[tag=c9_ctrl,limit=1] feet
  6. /execute if score #tick c9_t matches 0 as @e[tag=c9_w] run data merge entity @s {Pose:{RightArm:[-115f,0f,-10f],LeftArm:[-35f,0f,10f]}}
  7. /execute if score #tick c9_t matches 5 as @e[tag=c9_w] run data merge entity @s {Pose:{RightArm:[-25f,0f,5f],LeftArm:[-10f,0f,-5f]}}
  8. /execute if score #tick c9_t matches 5 as @e[tag=c9_w] at @s if block ^ ^1 ^0.9 air unless block ^ ^ ^0.9 air run setblock ^ ^ ^0.9 air destroy
  9. /execute if score #tick c9_t matches 5 as @e[tag=c9_w] at @s unless block ^ ^1 ^0.9 air run setblock ^ ^1 ^0.9 air destroy
  10. /execute if score #tick c9_t matches 5 as @e[tag=c9_w] at @s unless block ^ ^ ^0.9 air run particle dust{color:[1.0,0.8,0.2],scale:1.3} ^ ^0.8 ^0.8 0.3 0.3 0.3 0 12
  11. /execute if score #regen c9_t matches 318 as @e[tag=c9_w,distance=..4.3] at @s facing entity @e[tag=c9_ctrl,limit=1] feet run tp @s ^ ^ ^-4.5
  12. /execute if score #regen c9_t matches 319 run kill @e[type=item,distance=..14]
  13. /execute if score #regen c9_t matches 320 run fill ~-3 ~ ~-3 ~3 ~1 ~3 stone
  14. /execute if score #regen c9_t matches 321.. run scoreboard players set #regen c9_t 0

How it works

Frames from the test run

Autonomous Quarry Worker Crew - frame 1Autonomous Quarry Worker Crew - frame 2Autonomous Quarry Worker Crew - frame 3

Recorded on our own test server: 60 frames at about 9.8 fps. Our image check saw: Four glowing miniature armor stands named as miners move through an outcrop of stone, gold ore, and diamond ore on a deepslate platform, leaving behind dropped diamond, cobblestone, and raw gold items.

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 grassy area at least 15x15 blocks wide and stand at the center.
  2. Run the 10 setup commands in order from chat (or a one-time command block chain) at the center block.
  3. Place 14 repeating, always-active command blocks nearby and set their execution point to the quarry center.
  4. Paste each of the 14 loop commands into its own repeating command block.
  5. Watch the four miniature armored miners walk in, swing their pickaxes, and carve through the ore veins.

Remove it again 6 commands

  1. /kill @e[tag=c9_w]
  2. /kill @e[tag=c9_ctrl]
  3. /kill @e[type=item,distance=..14]
  4. /scoreboard objectives remove c9_t
  5. /fill ~-5 ~-1 ~-5 ~5 ~-1 ~5 grass_block
  6. /fill ~-3 ~ ~-3 ~3 ~1 ~3 air

FAQ

Can I change what blocks the quarry regenerates?

Yes. Edit the 13th loop command and replace stone with another block such as deepslate, andesite, or iron_ore.

Why do old mined items disappear every 16 seconds?

The 12th loop command clears loose drops right before the quarry resets so item entities never build up and cause lag.

Commands used

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

Similar creations

Join 9Minecraft News & Guides