Autonomous Tunneling Drone

Build a self-propelled mining drone from custom block displays that bores a 3x3 corridor through solid stone and ore while laying down rails and lights.

Java EditionMini-games & UtilitiesEasy24 commandsTested on a real 26.2 & 26.3 server
An autonomous diamond-drilled tunneling machine bores through stone and ore while placing rails and lanterns behind it. Download the GIF Video & GIF © www.9minecraft.net

Spawners & GeneratorsIndustrialTechnologyCyanOrangeWhiteBuilding ToolMap MakingBlock displaysArmor standsBlock building (fill/setblock/clone)21+ commands

Digging long underground tunnels by hand takes ages, so why not let a machine do the heavy lifting? The Autonomous Tunneling Drone is a self-propelled mining rig built from custom block displays that steadily chews a clean 3x3 corridor straight through solid stone and ore veins.

As the twin diamond drill heads bore forward in a shower of crushed rock and sparks, the machine automatically lays down minecart tracks and places lanterns along the floor behind it. In this demonstration, the front wall of the mountain is cut away like an open cross-section so you can clearly watch the drone operate from the outside.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_tick dummy
  2. /scoreboard players set #tick c9_tick 0
  3. /fill ~-6 ~ ~-3 ~6 ~4 ~1 stone
  4. /fill ~-5 ~1 ~-2 ~5 ~3 ~ diamond_ore
  5. /fill ~-6 ~ ~1 ~6 ~3 ~1 air
  6. /summon armor_stand ~-5.0 ~ ~ {Tags:["c9_drone","c9_root"],NoGravity:1b,Invisible:1b}
  7. /summon block_display ~-5.0 ~ ~ {Tags:["c9_drone","c9_body"],Glowing:1b,glow_color_override:16755200,block_state:{Name:"minecraft:blast_furnace",Properties:{facing:"east",lit:"true"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.8f,1.6f,1.6f],translation:[-1.6f,0.2f,-0.8f]}}
  8. /summon block_display ~-5.0 ~ ~ {Tags:["c9_drone","c9_core"],Glowing:1b,glow_color_override:16733525,block_state:{Name:"minecraft:redstone_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.9f,1.8f,1.8f],translation:[-1.0f,0.1f,-0.9f]}}
  9. /summon block_display ~-5.0 ~ ~ {Tags:["c9_drone","c9_drill1"],Glowing:1b,glow_color_override:5636095,block_state:{Name:"minecraft:iron_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0.382f,0f,0f,0.923f],scale:[1.0f,1.3f,1.3f],translation:[0.1f,0.9f,-0.9f]}}
  10. /summon block_display ~-5.0 ~ ~ {Tags:["c9_drone","c9_drill2"],Glowing:1b,glow_color_override:5636095,block_state:{Name:"minecraft:diamond_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0.382f,0.382f,0.841f],scale:[1.2f,0.9f,0.9f],translation:[0.9f,0.9f,-0.6f]}}

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

  1. /scoreboard players add #tick c9_tick 1
  2. /execute if score #tick c9_tick matches 110.. run scoreboard players set #tick c9_tick 0
  3. /execute if score #tick c9_tick matches 0 run tp @e[tag=c9_root] ~-5.0 ~ ~
  4. /execute if score #tick c9_tick matches 0 run fill ~-6 ~ ~-3 ~6 ~4 ~1 stone
  5. /execute if score #tick c9_tick matches 0 run fill ~-5 ~1 ~-2 ~5 ~3 ~ diamond_ore
  6. /execute if score #tick c9_tick matches 0 run fill ~-6 ~ ~1 ~6 ~3 ~1 air
  7. /execute as @e[tag=c9_root] at @s run tp @s ~0.1 ~ ~
  8. /execute at @e[tag=c9_root] run tp @e[tag=c9_drone,tag=!c9_root] ~ ~ ~
  9. /execute as @e[tag=c9_root] at @s run fill ~-1 ~ ~-1 ~2 ~2 ~1 air
  10. /execute as @e[tag=c9_root] at @s if block ~-2 ~-1 ~ grass_block run setblock ~-2 ~ ~ rail[shape=east_west]
  11. /execute as @e[tag=c9_root] at @s if block ~-2 ~-1 ~-1 grass_block run setblock ~-2 ~ ~-1 lantern
  12. /execute at @e[tag=c9_root] run particle block{block_state:{Name:"minecraft:diamond_ore"}} ~1.8 ~1.1 ~ 0.2 0.7 0.7 0.2 35
  13. /execute at @e[tag=c9_root] run particle flame ~1.7 ~1.0 ~ 0.2 0.5 0.5 0.05 14
  14. /execute at @e[tag=c9_root] run particle dust{color:[0.2,0.9,1.0],scale:1.6} ~1.5 ~1.0 ~ 0.3 0.6 0.6 0.05 16

How it works

Frames from the test run

Autonomous Tunneling Drone - frame 1Autonomous Tunneling Drone - frame 2Autonomous Tunneling Drone - frame 3

Recorded on our own test server: 49 frames at about 9.7 fps. Our image check saw: A custom block-display mining machine with diamond drill heads bores through a block of stone and diamond ore, leaving behind a trail of rails and lanterns while emitting sparks and particles.

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 at the centre of a flat area where you want the tunneling demonstration to run.
  2. Run the 10 setup commands in order in chat (or from impulse command blocks) to create the scoreboard timer, build the cutaway stone mountain, and summon the 5 parts of the drone.
  3. Place 14 repeating command blocks set to Always Active near the centre of your stage.
  4. Paste each of the 14 loop commands into its own repeating command block.
  5. Watch the drone bore through the diamond ore vein from left to right, lay down rails and lanterns behind itself, and reset every 5.5 seconds.
  6. When you are finished, run the remove commands to clean up the entities, stone wall, and scoreboard objective.

Use it with real players

To use this drone in a survival or creative build without the automatic demo reset, remove the first 6 loop commands (which handle the c9_tick timer and regenerate the stone wall). In the excavation command (loop command 9), change air to air destroy so the drill drops mined stone and ore items on the ground, and summon the c9_drone entities wherever you want to start digging toward positive X.

Remove it again 3 commands

  1. /kill @e[tag=c9_drone]
  2. /fill ~-6 ~ ~-3 ~6 ~4 ~2 air
  3. /scoreboard objectives remove c9_tick

FAQ

How can I make the drone drop the blocks it mines instead of deleting them?

In the ninth loop command, add the word destroy after air (/fill ~-1 ~ ~-1 ~2 ~2 ~1 air destroy). This breaks every stone and ore block as if mined with a pickaxe and drops the items on the floor.

How do I stop the drone from running away forever in my own world?

Keep the scoreboard counter active and change the reset commands to run /kill @e[tag=c9_drone] once #tick c9_tick reaches your desired tunnel length (10 ticks equals 1 block dug).

Commands used

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

Similar creations

Join 9Minecraft News & Guides