Minecraft wiki entry for Combat, associated text: Alternatively, if you want to kill them for drops or XP, stand under a tree or build a roof above you. When the phantom swoops down to attack, hit it when it is under the roof. The phantom will try to retreat, but will be blocked by the roof.