Autonomous Flamethrower Sentry

Build an autonomous rotating flamethrower turret that locks onto approaching monsters and unleashes a billowing cone of fire particles to roast them on sight.

Java EditionWands, Weapons & ToolsMedium24 commandsTested on a real 26.2 & 26.3 server
A mechanical flamethrower turret on a deepslate pedestal sprays fire at approaching zombies at night. Download the GIF Video & GIF © www.9minecraft.net

TrapsFireIndustrialTechnologyOrangeRedBlackMap MakingAdventure MapMini-gameBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Status effectsRotation math21+ commands

This command creation builds a mechanical flamethrower turret from block_display entities mounted on a deepslate pedestal. A lit blast furnace core, copper barrel, blackstone muzzle, and glowing magma fuel tank rotate smoothly together using teleport_duration interpolation.

When idle, the sentry sweeps in a slow circle scanning the perimeter. As soon as a monster approaches within 13 blocks, the turret snaps toward its target and fires a stream of area_effect_cloud flame nodes that billow with fire and orange dust particles while scorching everything in the cone.

1. Setup - type these once 10 commands

  1. /fill ~-1 ~ ~-1 ~1 ~ ~1 minecraft:polished_deepslate
  2. /setblock ~ ~1 ~ minecraft:polished_deepslate_wall
  3. /summon minecraft:villager ~ ~2.4 ~ {NoAI:1b,Silent:1b,Invulnerable:1b,NoGravity:1b,Tags:["c9_bait"]}
  4. /effect give @e[tag=c9_bait] minecraft:invisibility infinite 0 true
  5. /summon minecraft:block_display ~ ~2.4 ~ {Tags:["c9_head"],block_state:{Name:"minecraft:blast_furnace",Properties:{facing:"south",lit:"true"}},teleport_duration:2,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.45f,-0.45f,-0.45f],scale:[0.9f,0.9f,0.9f]}}
  6. /summon minecraft:block_display ~ ~2.4 ~ {Tags:["c9_part","c9_barrel"],block_state:{Name:"minecraft:copper_block"},teleport_duration:2,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.16f,-0.22f,0.2f],scale:[0.32f,0.32f,1.25f]}}
  7. /summon minecraft:block_display ~ ~2.4 ~ {Tags:["c9_part"],block_state:{Name:"minecraft:magma_block"},teleport_duration:2,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.28f,-0.2f,-0.85f],scale:[0.56f,0.56f,0.45f]}}
  8. /summon minecraft:block_display ~ ~2.4 ~ {Tags:["c9_part"],block_state:{Name:"minecraft:polished_blackstone"},teleport_duration:2,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.2f,-0.26f,1.25f],scale:[0.4f,0.4f,0.28f]}}
  9. /summon minecraft:marker ~ ~ ~ {Tags:["c9_spawner"]}
  10. /scoreboard objectives add c9_t dummy

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

  1. /scoreboard players add #spawn c9_t 1
  2. /execute as @e[tag=c9_spawner] at @s run tp @s ~ ~ ~ ~73 0
  3. /execute if score #spawn c9_t matches 35.. at @e[tag=c9_spawner] positioned ^ ^ ^13 run summon minecraft:zombie ~ ~ ~ {Tags:["c9_mob"],Health:12f}
  4. /execute if score #spawn c9_t matches 35.. run scoreboard players set #spawn c9_t 0
  5. /execute as @e[tag=c9_head] at @s if entity @e[tag=c9_mob,distance=..13] facing entity @e[tag=c9_mob,distance=..13,sort=nearest,limit=1] eyes run tp @s ~ ~ ~ ~ ~
  6. /execute as @e[tag=c9_head] at @s unless entity @e[tag=c9_mob,distance=..13] run tp @s ~ ~ ~ ~2.5 0
  7. /execute as @e[tag=c9_part] at @e[tag=c9_head,limit=1] run tp @s ~ ~ ~ ~ ~
  8. /execute at @e[tag=c9_head] if entity @e[tag=c9_mob,distance=..13] run summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["c9_flame"],Duration:13,Radius:0.0f}
  9. /execute as @e[tag=c9_flame,nbt={Age:0}] at @e[tag=c9_head,limit=1] run tp @s ^ ^ ^0.7 ~ ~
  10. /execute as @e[tag=c9_flame] at @s run tp @s ^ ^ ^0.9
  11. /execute at @e[tag=c9_flame] run particle minecraft:flame ~ ~ ~ 0.35 0.35 0.35 0.05 7 force
  12. /execute at @e[tag=c9_flame] run particle minecraft:dust{color:[1.0,0.45,0.05],scale:1.6} ~ ~ ~ 0.4 0.4 0.4 0.02 3 force
  13. /execute as @e[tag=c9_mob] at @s if entity @e[tag=c9_flame,distance=..2.2] run damage @s 2 minecraft:in_fire
  14. /execute as @e[tag=c9_mob] at @s if entity @e[tag=c9_flame,distance=..2.2] run data merge entity @s {Fire:60s}

How it works

Frames from the test run

Autonomous Flamethrower Sentry - frame 1Autonomous Flamethrower Sentry - frame 2Autonomous Flamethrower Sentry - frame 3

Recorded on our own test server: 57 frames at about 9.4 fps. Our image check saw: A turret with a blast furnace core and magma block tank sits on a deepslate pedestal at night, rotating to shoot streams of flame particles that ignite approaching zombies.

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 on the block where you want the center of the turret pedestal and run each of the 10 setup commands once in order (or put them in impulse/chain command blocks).
  2. Place 14 repeating, always-active, unconditional command blocks in a small cluster nearby, and paste one loop command into each block.
  3. Wait a moment for the rotating spawner marker to summon zombies around the perimeter and watch the turret track and incinerate them.
  4. Make sure your world difficulty is set to Easy, Normal, or Hard so zombies can spawn and approach the sentry.
  5. When you want to remove the sentry, disable the repeating command blocks and run the cleanup commands at the turret center.

Use it with real players

To use the sentry as a real base defense without the demo spawner, skip the villager bait and loop commands 1–4, then replace tag=c9_mob in the remaining loop commands with type=zombie or type=#minecraft:undead. Natural monsters wandering near your base will be targeted and roasted automatically while players stay safe.

Remove it again 8 commands

  1. /kill @e[tag=c9_head]
  2. /kill @e[tag=c9_part]
  3. /kill @e[tag=c9_bait]
  4. /kill @e[tag=c9_spawner]
  5. /kill @e[tag=c9_mob]
  6. /kill @e[tag=c9_flame]
  7. /fill ~-1 ~ ~-1 ~1 ~1 ~1 minecraft:air
  8. /scoreboard objectives remove c9_t

FAQ

Why are no monsters spawning near the turret?

Check that your world difficulty is not set to Peaceful, and verify that all 14 repeating command blocks are set to Always Active and inside loaded chunks.

Can the flamethrower set wooden builds or grass on fire?

No. The flame jet uses <code>flame</code> and <code>dust</code> particles combined with direct <code>/damage</code> and entity <code>Fire</code> ticks, so blocks around your base stay untouched.

Commands used

/damage/data/effect/execute/fill/particle/scoreboard/setblock/summon/tp

Similar creations

Join 9Minecraft News & Guides