Buried proximity mines wait in the grass until wandering mobs approach, then rocket upward to waist height while spinning and explode in a fiery blast.
TrapsFireTechnologyGreenOrangeRedPvPAdventure MapMini-gameParticlesItem displaysScoreboard timersExecute chainsSummoned mobsSoundsGlowing outlines21+ commands
Six compact TNT mines sit half-buried in the grass with a soft orange-red glow while test husks wander across the arena. As soon as a mob steps within two blocks of a buried trap, the mechanism springs upward to waist height, spinning rapidly with a trail of flame particles.
At the peak of its jump, each trap detonates in a burst of explosion particles and sound that damages and knocks back nearby mobs without breaking the grass platform. Detonated traps automatically re-arm in a fresh random spot so the demonstration runs continuously.
/scoreboard objectives add c9 dummy/summon minecraft:item_display ~2 ~ ~2 {Tags:["c9_trap"],item:{id:"minecraft:tnt",count:1},Glowing:1b,glow_color_override:16729344,transformation:{translation:[0f,-0.12f,0f],left_rotation:[0f,0f,0f,1f],scale:[0.55f,0.55f,0.55f],right_rotation:[0f,0f,0f,1f]}}/summon minecraft:item_display ~-2 ~ ~2 {Tags:["c9_trap"],item:{id:"minecraft:tnt",count:1},Glowing:1b,glow_color_override:16729344,transformation:{translation:[0f,-0.12f,0f],left_rotation:[0f,0f,0f,1f],scale:[0.55f,0.55f,0.55f],right_rotation:[0f,0f,0f,1f]}}/summon minecraft:item_display ~2 ~ ~-2 {Tags:["c9_trap"],item:{id:"minecraft:tnt",count:1},Glowing:1b,glow_color_override:16729344,transformation:{translation:[0f,-0.12f,0f],left_rotation:[0f,0f,0f,1f],scale:[0.55f,0.55f,0.55f],right_rotation:[0f,0f,0f,1f]}}/summon minecraft:item_display ~-2 ~ ~-2 {Tags:["c9_trap"],item:{id:"minecraft:tnt",count:1},Glowing:1b,glow_color_override:16729344,transformation:{translation:[0f,-0.12f,0f],left_rotation:[0f,0f,0f,1f],scale:[0.55f,0.55f,0.55f],right_rotation:[0f,0f,0f,1f]}}/summon minecraft:item_display ~ ~ ~ {Tags:["c9_trap"],item:{id:"minecraft:tnt",count:1},Glowing:1b,glow_color_override:16729344,transformation:{translation:[0f,-0.12f,0f],left_rotation:[0f,0f,0f,1f],scale:[0.55f,0.55f,0.55f],right_rotation:[0f,0f,0f,1f]}}/summon minecraft:item_display ~ ~ ~4 {Tags:["c9_trap"],item:{id:"minecraft:tnt",count:1},Glowing:1b,glow_color_override:16729344,transformation:{translation:[0f,-0.12f,0f],left_rotation:[0f,0f,0f,1f],scale:[0.55f,0.55f,0.55f],right_rotation:[0f,0f,0f,1f]}}/scoreboard players set @e[tag=c9_trap] c9 0/summon minecraft:husk ~4 ~ ~-1 {Tags:["c9_mob"],PersistenceRequired:1b}/summon minecraft:husk ~-4 ~ ~1 {Tags:["c9_mob"],PersistenceRequired:1b}/execute store result score #mobs c9 if entity @e[tag=c9_mob]/execute if score #mobs c9 matches ..4 run summon minecraft:husk ~ ~ ~ {Tags:["c9_mob","c9_unplaced"],PersistenceRequired:1b}/tag @e[tag=c9_mob,distance=7.5..] add c9_unplaced/scoreboard players add @e[tag=c9_trap,scores={c9=1..}] c9 1/execute as @e[tag=c9_trap,scores={c9=0}] at @s if entity @e[tag=c9_mob,distance=..2.2] run scoreboard players set @s c9 1/execute as @e[tag=c9_trap,scores={c9=1..9}] at @s run tp @s ~ ~0.14 ~ ~45 ~/execute at @e[tag=c9_trap,scores={c9=1..9}] run particle minecraft:flame ~ ~0.1 ~ 0.06 0.06 0.06 0.03 3/execute at @e[tag=c9_trap,scores={c9=10..}] run particle minecraft:explosion_emitter ~ ~ ~ 0.2 0.2 0.2 0 1/execute at @e[tag=c9_trap,scores={c9=10..}] run playsound minecraft:entity.generic.explode master @a ~ ~ ~ 1 1.1/execute at @e[tag=c9_trap,scores={c9=10..}] as @e[tag=c9_mob,distance=..3.6] run damage @s 14 minecraft:explosion at ~ ~ ~/tag @e[tag=c9_trap,scores={c9=10..}] add c9_unplaced/scoreboard players set @e[tag=c9_trap,scores={c9=10..}] c9 0/spreadplayers ~ ~ 2.5 6.0 false @e[tag=c9_unplaced]/tag @e[tag=c9_unplaced] remove c9_unplacedsetup #2 Summons a half-buried <code>item_display</code> TNT mine using a downward <code>transformation</code> offset and a scaled-down 0.55 size.loop #5 Checks every armed trap (<code>c9=0</code>) and starts its spring timer (<code>c9=1</code>) when a <code>c9_mob</code> enters the 2.2-block proximity radius.loop #6 Lifts triggered traps by 0.14 blocks and rotates them 45 degrees each tick for 9 ticks until they reach waist height.loop #10 Applies 14 explosion damage centered at the airborne trap's coordinates so mobs are knocked outward without harming the ground.loop #13 Re-plants detonated traps and any wandering mobs back onto random grass spots within 6 blocks of the arena center.


Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: In a grassy Minecraft arena, a half-buried TNT mine with an orange-red glow sits near wandering husks as explosion and flame particles damage and knock back nearby husks.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To make traps target real players or any hostile mob, change @e[tag=c9_mob,distance=..2.2] in the trigger command and @e[tag=c9_mob,distance=..3.6] in the damage command to @a (or @e[type=!item_display]). You can also remove the husk-spawning loop commands if you want to place traps manually in your own world using the trap /summon setup command.
/kill @e[tag=c9_trap]/kill @e[tag=c9_mob]/scoreboard objectives remove c9No. The detonation uses explosion particles, sound, and the <code>/damage</code> command instead of live TNT entities, so your grass or build stays completely intact.
Yes. Increase or decrease the vertical step <code>0.14</code> in the leap <code>/tp</code> command, or adjust the fuse limit from <code>9</code> and <code>10..</code> to change hang time.
/damage/execute/particle/playsound/scoreboard/spreadplayers/summon/tag/tp