Build an automated Minecraft perimeter wall with three sensor turrets that detect incoming desert husks and fire flaming arrows and explosive fireballs.
TrapsTechnologyFireRedCyanOrangeAdventure MapMap MakingPvPArmor standsSummoned mobsBlock building (fill/setblock/clone)21+ commands
The Directional Wall Defense Matrix sets up a fortified blackstone and lodestone wall equipped with three independent sensor nodes. In standby mode, each turret pulses with cyan scanning particles while monitoring a dedicated forward lane across the sandstone courtyard.
As soon as glowing siege husks enter a turret's detection zone, the node locks on with a bright red laser beam and unleashes alternating volleys of flaming arrows and explosive fireballs down the lane.
/scoreboard objectives add c9_timer dummy/scoreboard players set #tick c9_timer 0/fill ~-8 ~-1 ~-10 ~8 ~-1 ~10 cut_sandstone/fill ~-8 ~ ~-7 ~8 ~3 ~-7 chiseled_polished_blackstone/fill ~-7 ~1 ~-7 ~7 ~2 ~-7 iron_bars/fill ~-6 ~1 ~-7 ~-4 ~2 ~-7 lodestone/fill ~-1 ~1 ~-7 ~1 ~2 ~-7 lodestone/fill ~4 ~1 ~-7 ~6 ~2 ~-7 lodestone/summon armor_stand ~-5 ~1.5 ~-6 {Tags:["c9_node"],Invisible:1b,NoGravity:1b,Marker:1b,equipment:{head:{id:"minecraft:redstone_block",count:1}}}/summon armor_stand ~ ~1.5 ~-6 {Tags:["c9_node","c9_mid"],Invisible:1b,NoGravity:1b,Marker:1b,equipment:{head:{id:"minecraft:redstone_block",count:1}}}/execute unless entity @e[tag=c9_right] run summon armor_stand ~5 ~1.5 ~-6 {Tags:["c9_node","c9_right"],Invisible:1b,NoGravity:1b,Marker:1b,equipment:{head:{id:"minecraft:redstone_block",count:1}}}/scoreboard players add #tick c9_timer 1/execute if score #tick c9_timer matches 80.. run scoreboard players set #tick c9_timer 0/execute at @e[tag=c9_node] run particle dust{color:[0.0,0.85,1.0],scale:1.4} ~ ~0.4 ~ 0.35 0.35 0.15 0 3 force/execute at @e[tag=c9_node] positioned ~-2 ~-2 ~ if entity @e[type=husk,tag=c9_mob,dx=4,dy=4,dz=18] run particle dust{color:[1.0,0.05,0.05],scale:2.0} ~2 ~2.4 ~4 0.15 0.15 3.5 0 25 force/execute if score #tick c9_timer matches 2 unless entity @e[tag=c9_mob] run summon husk ~-5 ~ ~7 {Tags:["c9_mob"],CustomName:{"text":"Siege Husk","color":"gold"},Glowing:1b}/execute if score #tick c9_timer matches 5 if entity @e[tag=c9_mid] run summon husk ~ ~ ~8 {Tags:["c9_mob"],CustomName:{"text":"Siege Husk","color":"gold"},Glowing:1b}/execute if score #tick c9_timer matches 10 if entity @e[tag=c9_right] run summon husk ~5 ~ ~7 {Tags:["c9_mob"],CustomName:{"text":"Siege Husk","color":"gold"},Glowing:1b}/execute as @e[type=husk,tag=c9_mob] at @s if block ~ ~ ~-1 air run tp @s ~ ~ ~-0.07 facing ~ ~ ~-10/execute if score #tick c9_timer matches 10 at @e[tag=c9_node] positioned ~-2 ~-2 ~ if entity @e[type=husk,tag=c9_mob,dx=4,dy=4,dz=18] run summon arrow ~2 ~2.3 ~0.6 {Tags:["c9_proj"],Motion:[0.0,0.14,1.7],damage:5.0d,Fire:200s,pickup:0b}/execute if score #tick c9_timer matches 35 at @e[tag=c9_node] positioned ~-2 ~-2 ~ if entity @e[type=husk,tag=c9_mob,dx=4,dy=4,dz=18] run summon arrow ~2 ~2.3 ~0.6 {Tags:["c9_proj"],Motion:[0.0,0.14,1.7],damage:5.0d,Fire:200s,pickup:0b}/execute if score #tick c9_timer matches 60 at @e[tag=c9_node] positioned ~-2 ~-2 ~ if entity @e[type=husk,tag=c9_mob,dx=4,dy=4,dz=18] run summon fireball ~2 ~2.3 ~0.8 {Tags:["c9_proj"],acceleration_power:0.12,Motion:[0.0,-0.02,0.9],ExplosionPower:0b}/execute at @e[tag=c9_proj] run particle flame ~ ~ ~ 0.1 0.1 0.1 0.02 4 force/kill @e[tag=c9_mob,distance=20..]setup #9 Places invisible marker armor stands wearing redstone blocks in front of the lodestone turret pods to act as the sensor nodes.loop #5 Offsets the execution coordinates by <code>~-2 ~-2 ~</code> so the <code>dx=4,dy=4,dz=18</code> detection box covers the entire lane below and in front of each elevated sensor node, projecting a red targeting beam when a husk is inside.loop #10 Summons high-velocity flaming arrows from any node that currently detects a husk in its lane.loop #12 Fires an explosive ghast fireball with <code>ExplosionPower:0b</code> down the active lane so it deals impact damage and fiery blasts without destroying the sandstone floor.


Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A fortified blackstone and lodestone wall with three nodes faces a sandstone courtyard where the middle turret fires a red particle beam and fireballs at glowing husks while the left turret pulses with cyan particles.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To make this wall defend against real players or natural survival mobs instead of demo husks, replace type=husk,tag=c9_mob in loop commands 5, 10, 11, and 12 with type=#minecraft:raiders or type=player,distance=..18, and remove loop commands 6 through 9.
/kill @e[tag=c9_node]/kill @e[tag=c9_mob]/kill @e[tag=c9_proj]/scoreboard objectives remove c9_timer/fill ~-8 ~ ~-10 ~8 ~4 ~10 air/fill ~-8 ~-1 ~-10 ~8 ~-1 ~10 grass_blockIn Minecraft, box selectors like dx, dy, and dz only expand in positive directions by default. Offsetting the check with positioned ~-2 ~-2 ~ lets the elevated turret detect mobs walking on the ground below its height level.
No, the fireballs are summoned with ExplosionPower:0b, which creates the explosion sound, knockback, and impact damage without breaking any blocks.