Watch a custom multi-part Scarab Beetle scurry across a crystal garden with a smooth procedural walk cycle, obstacle avoidance, and glowing particle trails.
Pets & CompanionsNatureCuteMysticGoldGreenPurpleDecorationAdventure MapLearningBlock displaysSmooth animation (interpolation)Block building (fill/setblock/clone)Rotation math21+ commands
Traditional Minecraft mobs are limited to the shapes built into the game, unless you use display entities to construct your own creatures from scratch. This creation builds a miniature Scarab Beetle out of gold, emerald, and sea lantern block displays, complete with six articulated legs that swing back and forth in an alternating tripod walk cycle as it explores a crystal obstacle garden.
The beetle moves autonomously using a marker brain that checks the blocks directly ahead of it every tick. Whenever it bumps into one of the glowing amethyst pillars or wanders too far from the stage center, it emits a burst of magic particles and smoothly steers onto a new path while its golden shell bobs up and down.
/scoreboard objectives add c9_tick dummy/fill ~-6 ~ ~-6 ~6 ~1 ~6 air/setblock ~3 ~ ~2 amethyst_block/setblock ~-3 ~ ~1 amethyst_block/setblock ~1 ~ ~-3 amethyst_block/setblock ~-2 ~ ~-2 amethyst_block/summon marker ~ ~ ~ {Tags:["c9_ent","c9_bug"],Rotation:[35f,0f]}/summon block_display ~ ~ ~ {Tags:["c9_ent","c9_body"],Glowing:1b,glow_color_override:65450,teleport_duration:1,interpolation_duration:2,block_state:{Name:"minecraft:gold_block"},transformation:{translation:[-0.25f,0.18f,-0.35f],scale:[0.5f,0.3f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/summon block_display ~ ~ ~ {Tags:["c9_ent","c9_head"],Glowing:1b,glow_color_override:16766720,teleport_duration:1,block_state:{Name:"minecraft:sea_lantern"},transformation:{translation:[-0.2f,0.22f,0.25f],scale:[0.4f,0.22f,0.25f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}/summon block_display ~ ~ ~ {Tags:["c9_ent","c9_leg1"],Glowing:1b,glow_color_override:65450,teleport_duration:1,interpolation_duration:2,block_state:{Name:"minecraft:emerald_block"},transformation:{translation:[-0.5f,0.12f,-0.08f],scale:[1.0f,0.12f,0.16f],left_rotation:[0f,0.18f,0f,0.98f],right_rotation:[0f,0f,0f,1f]}}/summon block_display ~ ~ ~ {Tags:["c9_ent","c9_leg2"],Glowing:1b,glow_color_override:65450,teleport_duration:1,interpolation_duration:2,block_state:{Name:"minecraft:emerald_block"},transformation:{translation:[-0.5f,0.12f,-0.08f],scale:[1.0f,0.12f,0.16f],left_rotation:[0f,-0.18f,0f,0.98f],right_rotation:[0f,0f,0f,1f]}}/scoreboard players add #t c9_tick 1/execute if score #t c9_tick matches 8.. run scoreboard players set #t c9_tick 0/execute as @e[tag=c9_bug] at @s unless block ^ ^ ^0.75 air run tp @s ~ ~ ~ ~115 0/execute as @e[tag=c9_bug] at @s unless block ^ ^ ^0.75 air run particle wax_on ~ ~0.3 ~ 0.25 0.2 0.25 0 8/execute as @e[tag=c9_bug,distance=5.5..] at @s facing ~ ~ ~ run tp @s ~ ~ ~ ~15 0/execute as @e[tag=c9_bug] at @s if block ^ ^ ^0.75 air run tp @s ^ ^ ^0.14 ~3 0/execute at @e[tag=c9_bug] as @e[tag=c9_ent,tag=!c9_bug] run tp @s ~ ~ ~ ~ ~/execute if score #t c9_tick matches 0 as @e[tag=c9_leg1] run data merge entity @s {start_interpolation:0,interpolation_duration:4,transformation:{translation:[-0.5f,0.12f,-0.08f],scale:[1.0f,0.12f,0.16f],left_rotation:[0f,0.28f,0f,0.96f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 4 as @e[tag=c9_leg1] run data merge entity @s {start_interpolation:0,interpolation_duration:4,transformation:{translation:[-0.5f,0.12f,-0.08f],scale:[1.0f,0.12f,0.16f],left_rotation:[0f,-0.28f,0f,0.96f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 0 as @e[tag=c9_leg2] run data merge entity @s {start_interpolation:0,interpolation_duration:4,transformation:{translation:[-0.5f,0.12f,-0.08f],scale:[1.0f,0.12f,0.16f],left_rotation:[0f,-0.28f,0f,0.96f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 4 as @e[tag=c9_leg2] run data merge entity @s {start_interpolation:0,interpolation_duration:4,transformation:{translation:[-0.5f,0.12f,-0.08f],scale:[1.0f,0.12f,0.16f],left_rotation:[0f,0.28f,0f,0.96f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 0 as @e[tag=c9_body] run data merge entity @s {start_interpolation:0,interpolation_duration:4,transformation:{translation:[-0.25f,0.23f,-0.35f],scale:[0.5f,0.3f,0.7f],left_rotation:[0f,0f,0.06f,0.998f],right_rotation:[0f,0f,0f,1f]}}/execute if score #t c9_tick matches 4 as @e[tag=c9_body] run data merge entity @s {start_interpolation:0,interpolation_duration:4,transformation:{translation:[-0.25f,0.17f,-0.35f],scale:[0.5f,0.3f,0.7f],left_rotation:[0f,0f,-0.06f,0.998f],right_rotation:[0f,0f,0f,1f]}}/execute at @e[tag=c9_bug] run particle dust{color:[0.2,1.0,0.6],scale:0.7} ~ ~0.15 ~ 0.15 0.05 0.15 0 2setup #7 Summons an invisible <code>marker</code> tagged <code>c9_bug</code>. This marker acts as the creature's brain, storing its position and facing angle while all the visible body parts ride along.loop #3 Checks if the block 0.75 meters directly in front of the beetle (<code>^ ^ ^0.75</code>) is not air. When an obstacle is detected, it rotates the beetle by 115 degrees so it turns away from the pillar.loop #5 Keeps the critter inside the garden by checking if it has wandered more than 5.5 blocks away from the stage center and turning it back inward.loop #8 On tick 0 and tick 4 of the 8-tick walk cycle, <code>/data merge</code> updates the quaternion rotation of the emerald leg bars with a 4-tick interpolation duration, creating a continuous scissoring leg motion.


Recorded on our own test server: 59 frames at about 9.8 fps. Our image check saw: A small glowing golden beetle with green legs scurries across the grass between purple amethyst blocks before walking off-screen.
Commands, video and screenshots: tested and recorded by www.9minecraft.net © 9Minecraft. Sharing a video or screenshot? Please credit www.9minecraft.net.
To turn the critter into a companion pet that follows you instead of wandering inside the garden, replace loop command 5 (the distance=5.5.. boundary check) with /execute as @e[tag=c9_bug] at @s if entity @p[distance=3..] facing entity @p feet run tp @s ~ ~ ~ ~ ~ so it steers toward the nearest player whenever you walk away.
/kill @e[tag=c9_ent]/fill ~-6 ~ ~-6 ~6 ~1 ~6 air/scoreboard objectives remove c9_tickEach block_display has teleport_duration set to 1 for smooth movement and interpolation_duration set to 4 for its transformation matrix, so the client blends the leg rotations between keyframes.
Yes. Increase or decrease the ^ ^ ^0.14 step distance in the sixth loop command to change its speed, and adjust the 8-tick cycle reset in the second loop command to match.
▶Grazing Terrain PainterPets & CompanionsEasy24 cmds
▶Wandering Terrarium Bottle Alchemist PetPets & CompanionsMedium24 cmds
▶Floating Origami Fortune-Teller FamiliarPets & CompanionsMedium22 cmds
▶Knitted Yarn-Ball Kitten FamiliarPets & CompanionsMedium24 cmds
▶Airborne CompanionsPets & CompanionsEasy24 cmds
▶Bonsai Turtle Island CompanionPets & CompanionsMedium24 cmds