Build a glowing emerald praying mantis with display entities that tracks an orbiting fly with its head and strikes out with articulated forelegs.
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.
/scoreboard objectives add c9_t dummy/summon marker ~ ~ ~ {Tags:["c9_m","c9_ctrl"]}/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]}}/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]}}]}/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]}}]}/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]}}/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]}}/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]}}/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]}}/scoreboard players add @e[tag=c9_ctrl] c9_t 1/execute if score @e[tag=c9_ctrl,limit=1] c9_t matches 100.. run scoreboard players set @e[tag=c9_ctrl] c9_t 0/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 ~/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/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/execute as @e[tag=c9_head] at @s facing entity @e[tag=c9_fly,limit=1] feet run tp @s ~ ~ ~ ~ ~/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]}}/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/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]}}/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/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/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/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]}}/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]}}setup #4 Summons the abdomen, thorax, and four walking legs as a single passenger stack of scaled block_display entities so they stay anchored together at the stage center.setup #5 Creates the triangular mantis head using a rotated emerald item_display with a wide sea_lantern block_display passenger for the glowing compound eyes.loop #3 Moves the honeycomb fly along a curved orbit in front of the mantis using local caret coordinates (^ ^ ^) relative to the orbit center.loop #6 Rotates the mantis head every tick to face the fly's current position while keeping the head anchored in place.loop #7 At tick 65, snaps the upper forelegs forward using a 2-tick transformation interpolation.loop #9 Extends the lower raptorial blades downward and forward to meet the fly at the strike point, followed by sweep and sonic boom impact particles two ticks later.


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.
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.
/kill @e[tag=c9_m]/scoreboard objectives remove c9_tThe 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.
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.
▶Kinematic Hummingbird Hovering Nectar FeedCreatures & ModelsExpert24 cmds
▶Metamorphic Caterpillar Chrysalis Monarch EmergenceCreatures & ModelsExpert26 cmds
▶Articulated Chameleon Tongue Snatching FlyCreatures & ModelsHard23 cmds
▶Articulated Peacock Spider Mating DanceCreatures & ModelsHard24 cmds
▶Bioluminescent Jellyfish MigrationCreatures & ModelsHard24 cmds
▶Clockwork Peacock Tail FanningCreatures & ModelsExpert24 cmds