Articulated Praying Mantis Strike

Build a glowing emerald praying mantis with display entities that tracks an orbiting fly with its head and strikes out with articulated forelegs.

Java EditionHolograms & Display EntitiesHard23 commandsTested on a real 26.2 & 26.3 server
A glowing block-display praying mantis tracks and strikes at a golden fly in Minecraft at night. Download the GIF Video & GIF © www.9minecraft.net

Creatures & ModelsNatureGreenCyanGoldDecorationCinematicMap MakingParticlesBlock displaysItem displaysSmooth animation (interpolation)Riding & passengersGlowing outlinesRotation math21+ commands

This command creation constructs a giant praying mantis out of scaled display entities at the center of the stage. Its glowing triangular head and compound eyes continuously rotate to track a buzzing golden fly circling in front of it.

Every few seconds, the fly strays too close and the mantis snaps its multi-jointed raptorial forelegs forward in a fast strike, triggering sweep and sonic boom particles before resetting its stance.

1. Setup - type these once 9 commands

  1. /scoreboard objectives add c9_t dummy
  2. /summon marker ~ ~ ~ {Tags:["c9_m","c9_ctrl"]}
  3. /summon item_display ~ ~3.2 ~-3 {Tags:["c9_m","c9_fly"],Glowing:1b,glow_color_override:16755200,teleport_duration:2,item:{id:"minecraft:honeycomb"},transformation:{translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],scale:[0.5f,0.5f,0.5f],right_rotation:[0f,0f,0f,1f]}}
  4. /summon block_display ~ ~ ~ {Tags:["c9_m"],block_state:{Name:"minecraft:emerald_block"},transformation:{translation:[-0.6f,0.8f,0.5f],left_rotation:[-0.259f,0f,0f,0.966f],scale:[1.2f,1.1f,2.6f],right_rotation:[0f,0f,0f,1f]},Passengers:[{id:"minecraft:block_display",Tags:["c9_m"],block_state:{Name:"minecraft:lime_concrete"},transformation:{translation:[-0.35f,1.2f,-0.4f],left_rotation:[0.5f,0f,0f,0.866f],scale:[0.7f,2.8f,0.7f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_m"],block_state:{Name:"minecraft:moss_block"},transformation:{translation:[-1.8f,0f,0.5f],left_rotation:[0f,0f,0f,1f],scale:[3.6f,1.2f,0.3f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_m"],block_state:{Name:"minecraft:moss_block"},transformation:{translation:[-1.8f,0f,2.0f],left_rotation:[0f,0f,0f,1f],scale:[3.6f,1.2f,0.3f],right_rotation:[0f,0f,0f,1f]}}]}
  5. /summon item_display ~ ~3.7 ~-0.6 {Tags:["c9_m","c9_head"],Glowing:1b,glow_color_override:65280,teleport_duration:2,item:{id:"minecraft:emerald_block"},transformation:{translation:[0f,0f,0f],left_rotation:[0f,0f,0.707f,0.707f],scale:[0.9f,0.9f,0.6f],right_rotation:[0f,0f,0f,1f]},Passengers:[{id:"minecraft:block_display",Tags:["c9_m"],Glowing:1b,glow_color_override:16711935,block_state:{Name:"minecraft:sea_lantern"},transformation:{translation:[-0.65f,-0.1f,-0.2f],left_rotation:[0f,0f,0f,1f],scale:[1.3f,0.35f,0.35f],right_rotation:[0f,0f,0f,1f]}}]}
  6. /summon block_display ~-0.55 ~3.1 ~-0.4 {Tags:["c9_m","c9_arm_u"],Glowing:1b,glow_color_override:65280,teleport_duration:2,block_state:{Name:"minecraft:lime_glazed_terracotta"},transformation:{translation:[-0.2f,-1.4f,-0.2f],left_rotation:[0.383f,0f,0f,0.924f],scale:[0.4f,1.5f,0.4f],right_rotation:[0f,0f,0f,1f]}}
  7. /summon block_display ~0.55 ~3.1 ~-0.4 {Tags:["c9_m","c9_arm_u"],Glowing:1b,glow_color_override:65280,teleport_duration:2,block_state:{Name:"minecraft:lime_glazed_terracotta"},transformation:{translation:[-0.2f,-1.4f,-0.2f],left_rotation:[0.383f,0f,0f,0.924f],scale:[0.4f,1.5f,0.4f],right_rotation:[0f,0f,0f,1f]}}
  8. /summon block_display ~-0.55 ~2.1 ~-1.4 {Tags:["c9_m","c9_arm_l","c9_arm_l_l"],Glowing:1b,glow_color_override:16776960,teleport_duration:2,block_state:{Name:"minecraft:emerald_block"},transformation:{translation:[-0.15f,0f,-0.15f],left_rotation:[0.5f,0f,0f,0.866f],scale:[0.3f,1.7f,0.3f],right_rotation:[0f,0f,0f,1f]}}
  9. /summon block_display ~0.55 ~2.1 ~-1.4 {Tags:["c9_m","c9_arm_l","c9_arm_l_r"],Glowing:1b,glow_color_override:16776960,teleport_duration:2,block_state:{Name:"minecraft:emerald_block"},transformation:{translation:[-0.15f,0f,-0.15f],left_rotation:[0.5f,0f,0f,0.866f],scale:[0.3f,1.7f,0.3f],right_rotation:[0f,0f,0f,1f]}}

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

  1. /scoreboard players add @e[tag=c9_ctrl] c9_t 1
  2. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 100.. run scoreboard players set @e[tag=c9_ctrl] c9_t 0
  3. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 0..49 as @e[tag=c9_fly] at @s facing ~ ~3.2 ~-2.6 run tp @s ^0.18 ^0.03 ^0.06 ~10 ~
  4. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 50 as @e[tag=c9_fly] run tp @s ~ ~2.3 ~-2.6
  5. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 0..64 as @e[tag=c9_fly] at @s run particle dust{color:[1.0,0.9,0.2],scale:0.9} ~ ~ ~ 0.1 0.1 0.1 0 2
  6. /execute as @e[tag=c9_head] at @s facing entity @e[tag=c9_fly,limit=1] feet run tp @s ~ ~ ~ ~ ~
  7. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 65 as @e[tag=c9_arm_u] run data merge entity @s {start_interpolation:0,interpolation_duration:2,transformation:{translation:[-0.2f,-1.4f,-0.2f],left_rotation:[-0.5f,0f,0f,0.866f],scale:[0.4f,1.5f,0.4f],right_rotation:[0f,0f,0f,1f]}}
  8. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 65 as @e[tag=c9_arm_l] at @s run tp @s ~ ~1.0 ~-0.8
  9. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 65 as @e[tag=c9_arm_l] run data merge entity @s {start_interpolation:0,interpolation_duration:2,transformation:{translation:[-0.15f,0f,-0.15f],left_rotation:[-0.866f,0f,0f,0.5f],scale:[0.3f,1.8f,0.3f],right_rotation:[0f,0f,0f,1f]}}
  10. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 67 at @e[tag=c9_fly,limit=1] run particle sweep_attack ~ ~ ~ 0.3 0.3 0.3 0 6
  11. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 67 at @e[tag=c9_fly,limit=1] run particle sonic_boom ~ ~ ~ 0 0 0 0 1
  12. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 67..78 as @e[tag=c9_fly] run tp @s ~ ~2.0 ~-2.2 ~35 ~25
  13. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 80 as @e[tag=c9_arm_u] run data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{translation:[-0.2f,-1.4f,-0.2f],left_rotation:[0.383f,0f,0f,0.924f],scale:[0.4f,1.5f,0.4f],right_rotation:[0f,0f,0f,1f]}}
  14. /execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 80 as @e[tag=c9_arm_l] at @s run data merge entity @s {start_interpolation:0,interpolation_duration:10,transformation:{translation:[-0.15f,0f,-0.15f],left_rotation:[0.5f,0f,0f,0.866f],scale:[0.3f,1.7f,0.3f],right_rotation:[0f,0f,0f,1f]}}

How it works

Frames from the test run

Articulated Praying Mantis Strike - frame 1Articulated Praying Mantis Strike - frame 2Articulated Praying Mantis Strike - frame 3

Recorded on our own test server: 60 frames at about 9.9 fps. Our image check saw: A glowing green mantis made of block display entities tracks a small golden fly and strikes at it with its forelegs, creating a cyan particle trail above.

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 at the center of a flat open area where you want the praying mantis to appear.
  2. Run each of the 9 setup commands once in chat or in impulse command blocks anchored at that center position.
  3. Place 14 repeating command blocks (or 1 repeating command block leading into 13 chain command blocks), all set to Always Active.
  4. Paste the 14 loop commands into those command blocks in order, making sure they execute positioned at the same center block as the setup.
  5. Watch the mantis track the orbiting fly and strike every 5 seconds.

Use it with real players

To make the mantis track and strike at a real player instead of the demo fly, replace @e[tag=c9_fly,limit=1] in the head-tracking and particle loop commands with @p[distance=..8]. You can also trigger tick 65 only when a player walks within 3 blocks of the mantis by running /execute if entity @a[distance=..3] on the strike commands.

Remove it again 2 commands

  1. /kill @e[tag=c9_m]
  2. /scoreboard objectives remove c9_t

FAQ

Why do the forelegs move smoothly instead of snapping instantly in one frame?

The display entities use the interpolation_duration and teleport_duration NBT tags, which tell the Minecraft client to smoothly blend position and rotation changes over multiple ticks.

Can I change the colors of the praying mantis?

Yes. Change the block_state Name values in the setup commands from emerald_block and lime_concrete to any other blocks, and adjust glow_color_override to a different decimal RGB value.

Commands used

/data/execute/particle/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides