Terraria item ID 3779. Terraria 1.4.5.7.
The Spirit Flame is a Hardmode magic weapon that causes a small purple flame to appear in a random location around the player and hovers in midair when used. When an enemy comes within 25 tiles and has a clear line of sight to the flame, it will home in on that enemy. Upon impact with any enemy or block, it will cause a small explosion, dealing splash damage. The Spirit Flame can be used repeatedly to summon multiple flames, and the flames dissipate if no target is acquired within 4 seconds of casting. Its best modifier is Mythical.
Crafted at Mythril Anvil / Orichalcum Anvil. Ingredients:
Description from the Terraria Wiki.