Build an automated laser turret in Minecraft that fires gravity-defying, piercing arrows along a glowing crimson beam across a target range.
Lasers & BeamsTechnologyRedOrangePvPAdventure MapMini-gameArmor standsSummoned mobsBlock building (fill/setblock/clone)Sounds21+ commands
Normal arrows in Minecraft drop after a short distance and stop at the first mob they hit. This command creation builds an automated laser turret that projects a crimson guidance beam across a firing range and shoots glowing, gravity-defying arrows in a completely flat line.
Each arrow travels along the laser beam at constant speed, piercing straight through an entire row of armoured target dummies before striking the backstop. When a dummy is destroyed, the range automatically spawns a replacement so the turret can keep firing.
/scoreboard objectives add c9_timer dummy/fill ~-12 ~ ~-2 ~12 ~ ~2 polished_deepslate_slab[type=bottom]/fill ~-12 ~ ~ ~12 ~ ~ sea_lantern/setblock ~-10 ~ ~ chiseled_polished_blackstone/setblock ~-10 ~1 ~ dispenser[facing=east]/setblock ~-10 ~2 ~ redstone_lamp[lit=true]/setblock ~11 ~1 ~ target/setblock ~11 ~2 ~ redstone_lamp[lit=true]/summon marker ~-10 ~1.5 ~ {Tags:["c9_turret"]}/summon marker ~-6 ~1 ~ {Tags:["c9_pad"]}/scoreboard players add @e[tag=c9_turret] c9_timer 1/execute if score @e[tag=c9_turret,limit=1] c9_timer matches 1 run summon marker ~-2 ~1 ~ {Tags:["c9_pad"]}/execute if score @e[tag=c9_turret,limit=1] c9_timer matches 1 run summon marker ~2 ~1 ~ {Tags:["c9_pad"]}/execute if score @e[tag=c9_turret,limit=1] c9_timer matches 1 run summon marker ~6 ~1 ~ {Tags:["c9_pad"]}/execute at @e[tag=c9_pad] unless entity @e[tag=c9_dummy,distance=..1.5] run summon armor_stand ~ ~ ~ {Tags:["c9_dummy"],Rotation:[90f,0f],ShowArms:1b,equipment:{head:{id:"minecraft:carved_pumpkin",count:1},chest:{id:"minecraft:chainmail_chestplate",count:1},legs:{id:"minecraft:leather_leggings",count:1},feet:{id:"minecraft:leather_boots",count:1}}}/particle dust{color:[1.0,0.05,0.1],scale:0.8} ~ ~1.35 ~ 5.5 0 0 0 90 force/execute at @e[tag=c9_turret,scores={c9_timer=30..}] run summon arrow ~0.8 ~-0.15 ~ {Tags:["c9_arrow"],Motion:[1.6,0.0,0.0],NoGravity:1b,PierceLevel:10b,damage:20.0d,crit:1b,Glowing:1b}/execute at @e[tag=c9_turret,scores={c9_timer=30..}] run particle flame ~0.8 ~-0.15 ~ 0.1 0.1 0.1 0.05 15 force/execute at @e[tag=c9_turret,scores={c9_timer=30..}] run playsound minecraft:entity.illusioner.cast_spell master @a ~ ~ ~ 1 1.6/scoreboard players set @e[tag=c9_turret,scores={c9_timer=30..}] c9_timer 2/execute as @e[tag=c9_arrow] at @s run data merge entity @s {Motion:[1.6,0.0,0.0],life:1180s}/execute at @e[tag=c9_arrow] run particle dust{color:[1.0,0.8,0.1],scale:1.2} ~ ~ ~ 0.05 0.05 0.05 0 5 force/execute at @e[tag=c9_arrow] at @e[tag=c9_dummy,distance=..1.6] run particle crit ~ ~1 ~ 0.3 0.4 0.3 0.2 20 force/kill @e[tag=c9_arrow,nbt={inGround:1b}]loop #6 Spawns a stretched line of red <code>dust</code> particles along the X axis (<code>5.5 0 0</code> spread) between the turret and the target block to create a continuous laser sight.loop #7 Every 28 ticks, summons a glowing arrow in front of the turret with <code>NoGravity:1b</code> and <code>PierceLevel:10b</code> so it flies straight and passes right through multiple targets.loop #11 Locks the arrow's <code>Motion</code> vector every tick so air drag never slows it down, keeping it aligned with the laser beam all the way to the target block.loop #14 Immediately removes any laser arrow that has embedded into the target block (<code>inGround:1b</code>) so arrows never pile up on the stage.


Recorded on our own test server: 43 frames at about 8.6 fps. Our image check saw: A turret on the left projects a red particle laser beam through four armor stands with pumpkin heads, and shoots an arrow that destroys the first armor stand.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To make arrows shot from your own bow follow a laser beam instead of using the turret, remove the turret summon command and replace the arrow movement command with /execute as @p at @s anchored eyes run data modify entity @e[type=arrow,nbt={inGround:0b},limit=1,sort=nearest] Motion set value [1.6,0.0,0.0], or apply {NoGravity:1b,PierceLevel:10b,Glowing:1b} to any newly fired arrow near a player with /execute at @a as @e[type=arrow,distance=..3,tag=!c9_arrow] run data merge entity @s {Tags:["c9_arrow"],NoGravity:1b,PierceLevel:10b,Glowing:1b}.
/kill @e[tag=c9_turret]/kill @e[tag=c9_pad]/kill @e[tag=c9_dummy]/kill @e[tag=c9_arrow]/fill ~-12 ~ ~-2 ~12 ~3 ~2 air/scoreboard objectives remove c9_timerArrows normally lose 1% of their speed every tick due to air drag. By merging a fixed Motion vector into the arrow every tick alongside NoGravity:1b, it keeps a constant velocity forever until it hits a block.
The arrow is summoned with PierceLevel:10b, which is the same NBT tag used by the Piercing crossbow enchantment. It lets the arrow pass through up to 10 entities without stopping.
/data/execute/fill/kill/particle/playsound/scoreboard/setblock/summon
▶Automated Defense TurretsLasers & BeamsMedium26 cmds
▶Automated Sentinel TurretLasers & BeamsMedium24 cmds
▶Autonomous Defense TurretLasers & BeamsMedium24 cmds
▶Autonomous Lightning TurretLasers & BeamsMedium26 cmds
▶Barbershop Pole Helical Blood-Letting LanceLasers & BeamsHard22 cmds
▶Cyber-Grid Laser Wireframe Slicer CubeLasers & BeamsExpert24 cmds