Build an autonomous rolling sci-fi droid with display entities that patrols an area, spins its spherical core, and zaps nearby enemies with plasma lasers.
Pets & CompanionsTechnologySpaceWhiteOrangeBlueAdventure MapMap MakingDecorationBlock displaysItem displaysArmor standsSmooth animation (interpolation)Riding & passengersSummoned mobsRotation math21+ commands
This command creation spawns an autonomous spherical sci-fi droid built from composite block displays. As it patrols across the grass, its iron and orange core visibly rolls forward while its magnetic sensor head stays upright, swiveling toward threats and emitting a glowing cyan thruster trail.
Hostile cyberpunk zombies periodically warp onto the field to attack. Whenever an enemy steps within range, the droid locks its optics onto the target and fires a high-energy plasma beam accompanied by electric sparks and radial shockwave rings.
/scoreboard objectives add c9_timer dummy/scoreboard players set #tick c9_timer 0/scoreboard players set #zap_cd c9_timer 0/summon armor_stand ~ ~ ~-5 {Tags:["c9_droid"],Invisible:1b,NoGravity:1b,Invulnerable:1b,Rotation:[-90f,0f]}/summon item_display ~ ~0.6 ~-5 {Tags:["c9_droid_part","c9_body"],glowing:1b,glow_color_override:65535,Passengers:[{id:"minecraft:block_display",Tags:["c9_droid_part","c9_wheel"],block_state:{Name:"minecraft:iron_block"},transformation:{translation:[-0.45f,-0.45f,-0.45f],scale:[0.9f,0.9f,0.9f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_droid_part","c9_wheel"],block_state:{Name:"minecraft:orange_concrete"},transformation:{translation:[-0.5f,-0.35f,-0.35f],scale:[1.0f,0.7f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_droid_part","c9_wheel"],block_state:{Name:"minecraft:orange_concrete"},transformation:{translation:[-0.35f,-0.5f,-0.35f],scale:[0.7f,1.0f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_droid_part","c9_wheel"],block_state:{Name:"minecraft:sea_lantern"},transformation:{translation:[-0.35f,-0.35f,-0.5f],scale:[0.7f,0.7f,1.0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}/summon item_display ~ ~1.15 ~-5 {Tags:["c9_droid_part","c9_head"],glowing:1b,glow_color_override:16744192,Passengers:[{id:"minecraft:block_display",Tags:["c9_droid_part"],block_state:{Name:"minecraft:quartz_slab",Properties:{type:"bottom"}},transformation:{translation:[-0.35f,0.0f,-0.35f],scale:[0.7f,0.6f,0.7f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_droid_part"],block_state:{Name:"minecraft:black_concrete"},transformation:{translation:[-0.12f,0.1f,0.22f],scale:[0.24f,0.2f,0.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_droid_part"],block_state:{Name:"minecraft:sea_lantern"},transformation:{translation:[-0.06f,0.14f,0.25f],scale:[0.12f,0.12f,0.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}},{id:"minecraft:block_display",Tags:["c9_droid_part"],block_state:{Name:"minecraft:end_rod",Properties:{facing:"up"}},transformation:{translation:[-0.1f,0.3f,-0.25f],scale:[0.2f,0.5f,0.2f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}]}/summon husk ~4 ~ ~2 {Tags:["c9_enemy"],CustomName:{"text":"Cyber Husk","color":"red"},Health:18f,Glowing:1b,armor_items:[{},{},{},{id:"minecraft:iron_helmet",count:1}],attributes:[{id:"minecraft:movement_speed",base:0.15d}]}/summon husk ~-4 ~ ~3 {Tags:["c9_enemy"],CustomName:{"text":"Cyber Husk","color":"red"},Health:18f,Glowing:1b,armor_items:[{},{},{},{id:"minecraft:chainmail_helmet",count:1}],attributes:[{id:"minecraft:movement_speed",base:0.15d}]}/scoreboard players add #tick c9_timer 1/execute if score #tick c9_timer matches 45.. run scoreboard players set #tick c9_timer 0/execute as @e[tag=c9_droid] at @s run tp @s ^ ^ ^0.18 ~4.5 ~/execute at @e[tag=c9_droid] run tp @e[tag=c9_body] ~ ~0.6 ~ ~ ~/execute at @e[tag=c9_droid] as @e[tag=c9_head] run tp @s ~ ~1.15 ~ ~ ~/execute at @e[tag=c9_droid] if entity @e[tag=c9_enemy,distance=..14] as @e[tag=c9_head] at @s facing entity @e[tag=c9_enemy,distance=..14,limit=1,sort=nearest] eyes run tp @s ~ ~ ~ ~ ~/execute as @e[tag=c9_wheel] run data modify entity @s transformation.left_rotation set from entity @s transformation.right_rotation/execute if score #tick c9_timer matches 0..14 as @e[tag=c9_wheel] run data merge entity @s {interpolation_duration:1,start_interpolation:0,transformation:{left_rotation:[0.707f,0f,0f,0.707f]}}/execute if score #tick c9_timer matches 15..29 as @e[tag=c9_wheel] run data merge entity @s {interpolation_duration:1,start_interpolation:0,transformation:{left_rotation:[0.707f,0f,0f,-0.707f]}}/execute if score #tick c9_timer matches 30..44 as @e[tag=c9_wheel] run data merge entity @s {interpolation_duration:1,start_interpolation:0,transformation:{left_rotation:[0f,0f,0f,1f]}}/execute at @e[tag=c9_droid] run particle dust{color:[0.0,0.9,1.0],scale:1.2} ~ ~0.15 ~ 0.25 0.05 0.25 0 2 force/execute if score #tick c9_timer matches 0 unless entity @e[tag=c9_enemy,distance=..18] run summon husk ~3 ~ ~3 {Tags:["c9_enemy"],CustomName:{"text":"Cyber Husk","color":"red"},Health:18f,Glowing:1b,armor_items:[{},{},{},{id:"minecraft:iron_helmet",count:1}],attributes:[{id:"minecraft:movement_speed",base:0.15d}]}/scoreboard players add #zap_cd c9_timer 1/execute if score #zap_cd c9_timer matches 20.. at @e[tag=c9_head] if entity @e[tag=c9_enemy,distance=..14] facing entity @e[tag=c9_enemy,distance=..14,limit=1,sort=nearest] feet run summon area_effect_cloud ^ ^0.2 ^0.4 {Tags:["c9_zap"],Duration:5,Radius:0f,Passengers:[{id:"minecraft:area_effect_cloud",Tags:["c9_zap"],Duration:5,Radius:0f},{id:"minecraft:area_effect_cloud",Tags:["c9_zap"],Duration:5,Radius:0f}]}setup #5 Summons an <code>item_display</code> root entity for the droid's spherical body with four <code>block_display</code> passengers offset slightly along each axis (iron, orange concrete, and sea lantern) to form a rounded 3D core.loop #3 Moves the invisible controller armor stand forward by <code>0.18</code> blocks and rotates its yaw by <code>4.5</code> degrees every tick, driving the droid in a smooth, continuous patrol circle.loop #6 When an enemy tagged <code>c9_enemy</code> is within 14 blocks, the droid's floating head overrides its default forward rotation and swivels to face the nearest enemy's eyes.loop #8 Cycles the <code>left_rotation</code> quaternion of the wheel display blocks across three phases over a 45-tick timer so the sphere appears to physically tumble forward as the droid rolls.loop #14 Every 20 ticks, if an enemy is in range, triggers a laser blast by summoning short-lived marker clouds at the droid's optic lens aimed directly toward the nearest enemy.


Recorded on our own test server: 58 frames at about 9.6 fps. Our image check saw: A small rolling droid with an iron and orange body, upright sensor head, and blue particle trail moves across a grassy field near two glowing-outlined zombies.
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 droid follow and protect you instead of patrolling in a fixed circle, replace the third loop command with /execute as @e[tag=c9_droid] at @s facing entity @p[distance=3..] feet run tp @s ^ ^ ^0.18 ~ ~ and remove the tag=c9_enemy filter on the targeting commands replacing it with type=#minecraft:raiders or type=zombie so it targets natural hostile mobs around you.
/kill @e[tag=c9_droid]/kill @e[tag=c9_droid_part]/kill @e[tag=c9_enemy]/kill @e[tag=c9_zap]/scoreboard objectives remove c9_timerThe body and head are separate display entity hierarchies teleported to different vertical offsets above the base armor stand. Only the block displays tagged c9_wheel receive the tumbling quaternion rotations, while the head simply copies yaw and pitch.
Yes! Edit the block_state Name values inside the fifth and sixth setup commands. Changing orange_concrete to blue_concrete or blackstone gives the droid a completely different paint scheme.
▶Wandering Terrarium Bottle Alchemist PetPets & CompanionsMedium24 cmds
▶Liquid Mercury Morphing FamiliarPets & CompanionsExpert26 cmds
▶Alchemical Homunculus Flask IncubationPets & CompanionsHard24 cmds
▶Anti-Gravity Feline ParadoxPets & CompanionsEasy20 cmds
▶Loyal Clockwork Hound Fetch RoutinePets & CompanionsMedium24 cmds
▶Floating Bookworm Library FamiliarPets & CompanionsMedium24 cmds