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.
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.
/scoreboard objectives add c9_tick dummy/scoreboard players set #tick c9_tick 0/fill ~-6 ~ ~-3 ~6 ~4 ~1 stone/fill ~-5 ~1 ~-2 ~5 ~3 ~ diamond_ore/fill ~-6 ~ ~1 ~6 ~3 ~1 air/summon armor_stand ~-5.0 ~ ~ {Tags:["c9_drone","c9_root"],NoGravity:1b,Invisible:1b}/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]}}/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]}}/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]}}/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]}}/scoreboard players add #tick c9_tick 1/execute if score #tick c9_tick matches 110.. run scoreboard players set #tick c9_tick 0/execute if score #tick c9_tick matches 0 run tp @e[tag=c9_root] ~-5.0 ~ ~/execute if score #tick c9_tick matches 0 run fill ~-6 ~ ~-3 ~6 ~4 ~1 stone/execute if score #tick c9_tick matches 0 run fill ~-5 ~1 ~-2 ~5 ~3 ~ diamond_ore/execute if score #tick c9_tick matches 0 run fill ~-6 ~ ~1 ~6 ~3 ~1 air/execute as @e[tag=c9_root] at @s run tp @s ~0.1 ~ ~/execute at @e[tag=c9_root] run tp @e[tag=c9_drone,tag=!c9_root] ~ ~ ~/execute as @e[tag=c9_root] at @s run fill ~-1 ~ ~-1 ~2 ~2 ~1 air/execute as @e[tag=c9_root] at @s if block ~-2 ~-1 ~ grass_block run setblock ~-2 ~ ~ rail[shape=east_west]/execute as @e[tag=c9_root] at @s if block ~-2 ~-1 ~-1 grass_block run setblock ~-2 ~ ~-1 lantern/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/execute at @e[tag=c9_root] run particle flame ~1.7 ~1.0 ~ 0.2 0.5 0.5 0.05 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 16setup #5 Clears out the front-most layer of stone along the southern side of the mountain so you can watch the drone's chassis and diamond drill heads directly without solid stone blocking the view.setup #7 Summons the main chassis of the drone using a scaled blast furnace block display with an orange glow outline.setup #10 Creates the angled diamond tip of the drill head using quaternion rotation in the transformation tag.loop #7 Moves the invisible root armor stand forward by 0.1 blocks every tick along the X axis, while the next command teleports all visual display parts to match its position.loop #9 Carves out the 3x3 tunnel ahead of the drone by filling the blocks around and immediately in front of the root entity with air.loop #10 Checks for solid floor two blocks behind the drone and automatically places east-west minecart rails and floor lanterns as it advances.


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.
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.
/kill @e[tag=c9_drone]/fill ~-6 ~ ~-3 ~6 ~4 ~2 air/scoreboard objectives remove c9_tickIn 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.
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).
▶Tesla Coil Lightning Arc SpawnerSpawners & GeneratorsMedium24 cmds
▶3D Conveyor Belt LoopSpawners & GeneratorsMedium26 cmds
▶Automated Conveyor AssemblySpawners & GeneratorsEasy24 cmds
▶Automated Conveyor FactorySpawners & GeneratorsEasy24 cmds
▶Automated Crop HarvesterSpawners & GeneratorsMedium24 cmds
▶Automated Factory Assembly LineSpawners & GeneratorsMedium24 cmds