Minecraft wiki entry for Phantom-proofing, associated text: Phantoms spawn at night or during a thunderstorm at light level 7 or less. They also must spawn above sea level and they ignore the hostile mob cap when spawning (despite contributing to it). They will only spawn within 20-34 blocks above the player, as long as there are no blocks to stop skylight access. After three full in-game days without sleeping, phantoms will start spawning in increasing numbers for each extra sleepless night. They do not rely on surfaces to spawn. When they spawn, they announce their presence by hissing loudly.