Autonomous Phantom Blades

Summon three glowing, enchanted phantom blades that orbit around you and automatically dash out to strike nearby monsters with trails of cyan soul dust.

Java EditionHolograms & Display EntitiesMedium23 commandsTested on a real 26.2 & 26.3 server
Glowing floating swords orbit a central summoner with soul flame particles and lunge at nearby zombies. Download the GIF Video & GIF © www.9minecraft.net

Spinning ItemsMysticDarkCyanPinkPvPBoss FightAdventure MapItem displaysArmor standsSmooth animation (interpolation)Summoned mobsRotation math21+ commands

These Autonomous Phantom Blades are magical, floating weapons created using Minecraft's item display entities. Instead of sitting in your hand, three enchanted blades hover in a tight, glowing orbit around their summoner, trailing cyan soul dust and electric sparks as they spin through the air.

Controlled by a 60-tick scoreboard timer, the blades take turns breaking out of their orbit to lunge directly at nearby monsters. When a blade reaches its target, it triggers a sweeping slash animation before returning to its protective circle.

1. Setup - type these once 9 commands

  1. /scoreboard objectives add c9_timer dummy
  2. /summon armor_stand ~ ~ ~ {Tags:["c9_blade","c9_actor"],NoGravity:1b,ShowArms:1b,Glowing:1b,equipment:{feet:{id:"minecraft:netherite_boots",count:1},legs:{id:"minecraft:netherite_leggings",count:1},chest:{id:"minecraft:netherite_chestplate",count:1},head:{id:"minecraft:soul_lantern",count:1}},CustomName:{"text":"Blade Summoner","color":"aqua"},CustomNameVisible:1b}
  3. /summon item_display ~ ~1.5 ~ {Tags:["c9_blade","c9_b1"],Glowing:1b,glow_color_override:65535,teleport_duration:2,item:{id:"minecraft:diamond_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},transformation:{left_rotation:[0f,0f,-0.382f,0.923f],right_rotation:[0f,0f,0f,1f],scale:[1.4f,1.4f,1.4f],translation:[0f,0f,0f]}}
  4. /summon item_display ~ ~1.5 ~ {Tags:["c9_blade","c9_b2"],Glowing:1b,glow_color_override:16711935,teleport_duration:2,item:{id:"minecraft:netherite_sword",count:1,components:{"minecraft:enchantment_glint_override":true}},transformation:{left_rotation:[0f,0f,-0.382f,0.923f],right_rotation:[0f,0f,0f,1f],scale:[1.4f,1.4f,1.4f],translation:[0f,0f,0f]}}
  5. /summon item_display ~ ~1.5 ~ {Tags:["c9_blade","c9_b3"],Glowing:1b,glow_color_override:65535,teleport_duration:2,item:{id:"minecraft:trident",count:1,components:{"minecraft:enchantment_glint_override":true}},transformation:{left_rotation:[0f,0f,0.382f,0.923f],right_rotation:[0f,0f,0f,1f],scale:[1.2f,1.2f,1.2f],translation:[0f,0f,0f]}}
  6. /summon zombie ~5 ~ ~3 {Tags:["c9_blade","c9_target"],NoAI:1b,Silent:1b,PersistenceRequired:1b,Glowing:1b,equipment:{head:{id:"minecraft:iron_helmet",count:1}}}
  7. /summon husk ~-4 ~ ~4 {Tags:["c9_blade","c9_target"],NoAI:1b,Silent:1b,PersistenceRequired:1b,Glowing:1b,equipment:{head:{id:"minecraft:golden_helmet",count:1}}}
  8. /summon skeleton ~1 ~ ~-5 {Tags:["c9_blade","c9_target"],NoAI:1b,Silent:1b,PersistenceRequired:1b,Glowing:1b,equipment:{head:{id:"minecraft:chainmail_helmet",count:1}}}
  9. /scoreboard players set #tick c9_timer 0

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

  1. /scoreboard players add #tick c9_timer 1
  2. /execute if score #tick c9_timer matches 60.. run scoreboard players set #tick c9_timer 0
  3. /execute as @e[tag=c9_actor] at @s run tp @s ~ ~ ~ ~8 ~
  4. /execute at @e[tag=c9_actor] run particle soul_fire_flame ~ ~1.1 ~ 0.5 0.5 0.5 0.02 2
  5. /execute if score #tick c9_timer matches 1..40 at @e[tag=c9_actor] rotated ~ 0 positioned ^1.8 ^1.4 ^0.5 run tp @e[tag=c9_b1,limit=1] ~ ~ ~ ~90 ~
  6. /execute if score #tick c9_timer matches 41..59 as @e[tag=c9_b1] at @s facing entity @e[tag=c9_target,sort=nearest,limit=1] feet positioned ^ ^ ^0.95 run tp @s ~ ~ ~ ~ ~
  7. /execute if score #tick c9_timer matches 1..19 at @e[tag=c9_actor] rotated ~120 0 positioned ^1.8 ^1.6 ^0.5 run tp @e[tag=c9_b2,limit=1] ~ ~ ~ ~90 ~
  8. /execute if score #tick c9_timer matches 40..59 at @e[tag=c9_actor] rotated ~120 0 positioned ^1.8 ^1.6 ^0.5 run tp @e[tag=c9_b2,limit=1] ~ ~ ~ ~90 ~
  9. /execute if score #tick c9_timer matches 20..39 as @e[tag=c9_b2] at @s facing entity @e[tag=c9_target,sort=arbitrary,limit=1] feet positioned ^ ^ ^0.95 run tp @s ~ ~ ~ ~ ~
  10. /execute if score #tick c9_timer matches 20..59 at @e[tag=c9_actor] rotated ~240 0 positioned ^1.8 ^1.8 ^0.5 run tp @e[tag=c9_b3,limit=1] ~ ~ ~ ~90 ~
  11. /execute if score #tick c9_timer matches 0..19 as @e[tag=c9_b3] at @s facing entity @e[tag=c9_target,sort=furthest,limit=1] feet positioned ^ ^ ^0.95 run tp @s ~ ~ ~ ~ ~
  12. /execute at @e[tag=c9_b1] run particle dust{color:[0.0,1.0,1.0],scale:1.1} ~ ~ ~ 0.05 0.05 0.05 0 2
  13. /execute at @e[tag=c9_b2] run particle dust{color:[1.0,0.1,0.9],scale:1.1} ~ ~ ~ 0.05 0.05 0.05 0 2
  14. /execute at @e[tag=c9_target] if entity @e[type=item_display,tag=c9_blade,distance=..1.6] run particle sweep_attack ~ ~1 ~ 0.2 0.2 0.2 0 1

How it works

Frames from the test run

Autonomous Phantom Blades - frame 1Autonomous Phantom Blades - frame 2Autonomous Phantom Blades - frame 3

Recorded on our own test server: 52 frames at about 8.6 fps. Our image check saw: Three glowing cyan and magenta swords orbit a central entity with soul flame particles and lunge out to attack nearby glowing zombies.

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. Open your chat and run all 9 setup commands in order to create the scoreboard timer, the summoner stand, the three glowing blades, and the three target mobs.
  2. Place a repeating command block set to Always Active and paste in the first loop command to start the 60-tick timer.
  3. Chain 13 chain command blocks (Always Active, Unconditional) onto the repeating block and paste the remaining loop commands in order.
  4. Watch the three blades orbit the summoner and take turns dashing out to slash the target monsters.
  5. When you are finished, run the remove commands to delete all tagged entities and the scoreboard objective.

Use it with real players

To make the phantom blades orbit and fight for your actual player instead of the armor stand, give yourself the actor tag with /tag @s add c9_actor and remove the third loop command that rotates the armor stand. To deal real damage to survival mobs instead of just target dummies, replace tag=c9_target with type=#minecraft:raiders or family=monster, and add a chain command block running /execute at @e[type=item_display,tag=c9_blade] run damage @e[type=!player,type=!item_display,type=!armor_stand,distance=..1.6,limit=1] 4 minecraft:magic.

Remove it again 2 commands

  1. /kill @e[tag=c9_blade]
  2. /scoreboard objectives remove c9_timer

FAQ

Why do the blades move smoothly instead of snapping every tick?

Each item_display entity has teleport_duration set to 2 ticks in its NBT, which tells the Minecraft client to smoothly interpolate between each teleport position.

Can I change the items used for the floating blades?

Yes. Edit the item.id field in setup commands 3, 4, and 5 to any weapon or tool such as minecraft:golden_axe or minecraft:mace.

Commands used

/execute/particle/scoreboard/summon/tp

Similar creations

Join 9Minecraft News & Guides