Build an automated deepslate ceiling trap armed with three oversized glowing stalactites that slam down whenever a mob crosses the cyan sensor field.
Arenas & Mini-gamesDarkTechnologyCyanRedBlackAdventure MapMap MakingPvPBlock displaysSmooth animation (interpolation)Summoned mobsBlock building (fill/setblock/clone)Sounds21+ commands
This command creation builds a deepslate overhead gantry armed with three massive, glowing stalactites made from block_display entities. A shimmering cyan sensor field guards the floor below, waiting for any wandering mob to step inside.
Once triggered, the sensor flashes a red warning alarm before violently dropping the three spikes to crush the target with an explosion effect, then smoothly winches the spikes back up into the ceiling for the next victim.
/scoreboard objectives add c9_trap dummy/fill ~-3 ~-1 ~-3 ~3 ~-1 ~3 minecraft:deepslate_tiles/setblock ~ ~-1 ~ minecraft:sculk_sensor/fill ~-4 ~0 ~-1 ~-4 ~9 ~1 minecraft:polished_deepslate/fill ~4 ~0 ~-1 ~4 ~9 ~1 minecraft:polished_deepslate/fill ~-4 ~9 ~-3 ~4 ~9 ~3 minecraft:deepslate_bricks/summon minecraft:marker ~ ~ ~ {Tags:["c9_core"]}/summon minecraft:block_display ~-2 ~5.5 ~ {Tags:["c9_spike"],teleport_duration:1,Glowing:1b,brightness:{sky:15,block:15},block_state:{Name:"minecraft:pointed_dripstone",Properties:{thickness:"tip",vertical_direction:"down"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.7f,0f,-0.7f],scale:[1.4f,3.5f,1.4f]}}/summon minecraft:block_display ~ ~5.5 ~ {Tags:["c9_spike"],teleport_duration:1,Glowing:1b,brightness:{sky:15,block:15},block_state:{Name:"minecraft:pointed_dripstone",Properties:{thickness:"tip",vertical_direction:"down"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.7f,0f,-0.7f],scale:[1.4f,3.5f,1.4f]}}/summon minecraft:block_display ~2 ~5.5 ~ {Tags:["c9_spike"],teleport_duration:1,Glowing:1b,brightness:{sky:15,block:15},block_state:{Name:"minecraft:pointed_dripstone",Properties:{thickness:"tip",vertical_direction:"down"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[-0.7f,0f,-0.7f],scale:[1.4f,3.5f,1.4f]}}/execute as @e[tag=c9_core,limit=1] run scoreboard players add @s c9_trap 0/scoreboard players add #mob c9_trap 1/execute if score @e[tag=c9_core,limit=1] c9_trap matches 0 if score #mob c9_trap matches 25.. unless entity @e[tag=c9_mob,distance=..6] run summon minecraft:husk ~ ~0 ~-3.0 {Tags:["c9_mob"],PersistenceRequired:1b,Motion:[0.0,0.1,0.4]}/execute if score #mob c9_trap matches 25.. run scoreboard players set #mob c9_trap 0/execute if score @e[tag=c9_core,limit=1] c9_trap matches 0 run particle minecraft:dust{color:[0.1,0.9,1.0],scale:1.2} ~ ~0.25 ~ 1.4 0.1 1.4 0 12/execute if score @e[tag=c9_core,limit=1] c9_trap matches 1.. run scoreboard players add @e[tag=c9_core,limit=1] c9_trap 1/execute if score @e[tag=c9_core,limit=1] c9_trap matches 0 if entity @e[tag=c9_mob,distance=..2.6] run scoreboard players set @e[tag=c9_core,limit=1] c9_trap 1/execute if score @e[tag=c9_core,limit=1] c9_trap matches 2..10 run particle minecraft:dust{color:[1.0,0.1,0.1],scale:1.8} ~ ~0.5 ~ 1.8 0.3 1.8 0 18/execute if score @e[tag=c9_core,limit=1] c9_trap matches 11..15 as @e[tag=c9_spike] at @s run tp @s ~ ~-1.12 ~/execute if score @e[tag=c9_core,limit=1] c9_trap matches 16 as @e[tag=c9_mob,distance=..3.2] run damage @s 40 minecraft:falling_stalactite/execute if score @e[tag=c9_core,limit=1] c9_trap matches 16 run playsound minecraft:block.anvil.land hostile @a ~ ~ ~ 1 0.7/execute if score @e[tag=c9_core,limit=1] c9_trap matches 16 run particle minecraft:explosion ~ ~0.5 ~ 1.5 0.2 1.5 0 6/execute if score @e[tag=c9_core,limit=1] c9_trap matches 35..54 as @e[tag=c9_spike] at @s run tp @s ~ ~0.28 ~/execute if score @e[tag=c9_core,limit=1] c9_trap matches 55.. run scoreboard players set @e[tag=c9_core,limit=1] c9_trap 0setup #8 Summons a giant glowing pointed dripstone <code>block_display</code> scaled to 1.4x width and 3.5x height, with <code>teleport_duration:1</code> for smooth falling motion.loop #7 Checks if the trap is idle (score 0) and any target mob is within 2.6 blocks of the sculk sensor, setting the timer to 1 to start the firing sequence.loop #9 During ticks 11 to 15, teleports all three spikes downward by 1.12 blocks per tick (5.6 blocks total) so they slam into the floor.loop #10 At tick 16 (impact), deals 40 points of <code>minecraft:falling_stalactite</code> damage to any mob caught beneath the spikes.loop #13 During ticks 35 to 54, slowly raises the spikes by 0.28 blocks per tick over 20 ticks to return them to their exact starting height.


Recorded on our own test server: 55 frames at about 9.1 fps. Our image check saw: A deepslate gantry holds three glowing dripstone spikes that drop down onto a cyan-and-red particle sensor to crush a mob with an explosion effect.
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 trap defend your base against real players or natural monsters instead of spawning demo husks, omit loop commands 2, 3, and 4, and replace @e[tag=c9_mob,distance=..2.6] in loop command 7 and @e[tag=c9_mob,distance=..3.2] in loop command 10 with @e[type=!minecraft:marker,type=!minecraft:block_display,type=!minecraft:item,distance=..2.8].
/kill @e[tag=c9_spike]/kill @e[tag=c9_core]/kill @e[tag=c9_mob]/fill ~-4 ~0 ~-3 ~4 ~9 ~3 minecraft:air/fill ~-3 ~-1 ~-3 ~3 ~-1 ~3 minecraft:grass_block/scoreboard objectives remove c9_trapThey drop 1.12 blocks per tick for 5 ticks (5.60 blocks total) and rise 0.28 blocks per tick for 20 ticks (also 5.60 blocks total), so their height never drifts.
Yes, change the number 40 in the <code>/damage @s 40 minecraft:falling_stalactite</code> loop command to any amount of health points you want.
/damage/execute/fill/particle/playsound/scoreboard/setblock/summon/tp
▶Laser Grid Dodgeball Vault ArenaArenas & Mini-gamesMedium24 cmds
▶Pendulum Harmonograph Geometric Arena PainterArenas & Mini-gamesExpert24 cmds
▶Cinematic Action Camera RigArenas & Mini-gamesHard24 cmds
▶Tornado Vortex Battle Royale ZoneArenas & Mini-gamesExpert19 cmds
▶Gilded Zoetrope Spinning Animation DisplayArenas & Mini-gamesExpert23 cmds
▶Gyroscopic Floating Ring Obstacle ArenaArenas & Mini-gamesExpert23 cmds