Minecraft wiki entry for Combat, associated text: After spawning, they will fly around the player and swoop down to attack. Outrunning them is a rather futile method against them. Instead, the best way to avoid being attacked by them is by going inside a house, cave, making a small hole in the ground, or sleeping. Phantoms are undead mobs, so sleeping or waiting them out until daytime will cause them to burn in the sun. They are also affected by Smite. Phantoms are afraid of cats so it's best to have one around the player to prevent phantoms from swooping down.