Automated Laser Quarry in Vanilla Minecraft

Build an automated industrial laser quarry in vanilla Minecraft that sweeps a high-energy redstone laser beam across an ore deposit and mines blocks.

Java EditionMini-games & UtilitiesHard24 commandsTested on a real 26.2 & 26.3 server
An automated laser quarry with an iron frame mining blocks using red laser beams and particles. Download the GIF Video & GIF © www.9minecraft.net

Spawners & GeneratorsIndustrialTechnologyRedWhiteGoldBuilding ToolDecorationMap MakingBlock displaysArmor standsRiding & passengersBlock building (fill/setblock/clone)Sounds21+ commands

This command creation builds a working industrial laser quarry right on your stage. A glowing redstone laser housing slides back and forth across a heavy iron frame suspended above a rich deposit of stone, gold, diamond, and emerald ores.

As the gantry moves across the rails, it fires a thick, glowing red laser beam and particle stream down into the quarry pit. Every block struck by the laser vaporizes in a shower of sparks and drops its items, automatically resetting once the pit is cleared.

1. Setup - type these once 10 commands

  1. /scoreboard objectives add c9_q dummy
  2. /fill ~-5 ~ ~-5 ~5 ~7 ~5 iron_block outline
  3. /fill ~-4 ~ ~-5 ~4 ~6 ~5 air
  4. /fill ~-5 ~ ~-4 ~5 ~6 ~4 air
  5. /fill ~-4 ~7 ~-4 ~4 ~7 ~4 iron_bars
  6. /fill ~-3 ~ ~-3 ~3 ~3 ~3 stone
  7. /fill ~-2 ~1 ~-2 ~2 ~3 ~2 diamond_ore
  8. /fill ~-1 ~2 ~-1 ~1 ~3 ~1 emerald_ore
  9. /summon armor_stand ~-3 ~3 ~-3 {Tags:["c9_q","c9_miner"],Invisible:1b,NoGravity:1b,Marker:1b}
  10. /summon block_display ~-3 ~6.5 ~-3 {Tags:["c9_q","c9_head"],Glowing:1b,glow_color_override:16711680,block_state:{Name:"minecraft:redstone_block"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.2f,1.2f,1.2f],translation:[-0.6f,0f,-0.6f]},Passengers:[{id:"minecraft:block_display",Tags:["c9_q","c9_beam"],Glowing:1b,glow_color_override:16724787,block_state:{Name:"minecraft:red_stained_glass"},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[0.35f,5.5f,0.35f],translation:[-0.175f,-5.5f,-0.175f]}}]}

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

  1. /scoreboard players add #t c9_q 1
  2. /execute if score #t c9_q matches 3.. run scoreboard players set #t c9_q 0
  3. /execute as @e[tag=c9_miner] at @s run particle dust{color:[1.0,0.1,0.1],scale:2.0} ~ ~2 ~ 0.08 1.8 0.08 0 25 force
  4. /execute as @e[tag=c9_miner] at @s run particle flame ~ ~0.5 ~ 0.15 0.3 0.15 0.02 6 force
  5. /execute if score #t c9_q matches 0 as @e[tag=c9_miner] at @s unless block ~ ~ ~ air run particle lava ~ ~0.5 ~ 0.2 0.2 0.2 0 8 force
  6. /execute if score #t c9_q matches 0 as @e[tag=c9_miner] at @s unless block ~ ~ ~ air run playsound block.amethyst_block.chime master @a ~ ~ ~ 0.8 1.6
  7. /execute if score #t c9_q matches 0 as @e[tag=c9_miner] at @s unless block ~ ~ ~ air run setblock ~ ~ ~ air destroy
  8. /execute if score #t c9_q matches 0 as @e[tag=c9_miner] at @s run scoreboard players add #x c9_q 1
  9. /execute if score #t c9_q matches 0 as @e[tag=c9_miner] at @s run tp @s ~1 ~ ~
  10. /execute if score #t c9_q matches 0 if score #x c9_q matches 7.. as @e[tag=c9_miner] at @s run tp @s ~-7 ~ ~1
  11. /execute if score #t c9_q matches 0 if score #x c9_q matches 7.. run scoreboard players add #z c9_q 1
  12. /execute if score #t c9_q matches 0 if score #x c9_q matches 7.. run scoreboard players set #x c9_q 0
  13. /execute if score #t c9_q matches 0 if score #z c9_q matches 7.. as @e[tag=c9_miner] at @s run tp @s ~ ~-1 ~-7
  14. /execute if score #t c9_q matches 0 if score #z c9_q matches 7.. run scoreboard players set #z c9_q 0

How it works

Frames from the test run

Automated Laser Quarry in Vanilla Minecraft - frame 1Automated Laser Quarry in Vanilla Minecraft - frame 2Automated Laser Quarry in Vanilla Minecraft - frame 3

Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: An iron block gantry frame stands over a cube of stone and ores, while a glowing red laser mechanism on top fires red particles downward to mine away layers of blocks.

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 center of a flat open area where you want the quarry built.
  2. Run each of the 10 setup commands in order to construct the iron quarry frame, fill the ore deposit, and spawn the laser assembly.
  3. Place a line of 14 repeating command blocks (or 1 repeating followed by 13 chain command blocks) set to Always Active.
  4. Paste the 14 loop commands into the command blocks so they execute centered on the quarry.
  5. To make the gantry head follow the mining point horizontally, you can also run <code>/execute at @e[tag=c9_miner] as @e[tag=c9_head] run tp @s ~ 6.5 ~</code> or keep it locked to the miner's X and Z coordinates.

Use it with real players

To let players relocate the quarry anywhere in survival or creative mode, summon the c9_miner marker at a named armor stand or drop item thrown by a player, and run the /fill setup commands relative to that marker.

Remove it again 4 commands

  1. /kill @e[tag=c9_q]
  2. /kill @e[type=item,distance=..15]
  3. /fill ~-5 ~ ~-5 ~5 ~8 ~5 air
  4. /scoreboard objectives remove c9_q

FAQ

How do I change the mining speed of the laser quarry?

In the second loop command, change <code>matches 3..</code> to a higher number like <code>10..</code> for slower mining, or <code>1..</code> to mine a block every single tick.

Does the laser drop the mined blocks as collectible items?

Yes! Because the command uses <code>setblock ~ ~ ~ air destroy</code>, every ore block breaks naturally and drops its items on the quarry floor for hoppers or players to collect.

Commands used

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

Similar creations

Join 9Minecraft News & Guides