In both editions, they spawn in the Overworld above the player if the "since last rest" statistic is at least 1 hour (72000 ticks or 3 in-game days). This statistic is reset when the player enters a bed, dies, or switches the doInsomnia gamerule from false to true .
How do you keep phantoms away?
Even though phantoms are not inhibited by water, having an AFK spot below sea level prevents their spawning entirely. Pros: An AFK spot can be placed anywhere in any biome as long as it is somewhere below sea level. It is very easy to dig a hole just deep enough to prevent phantom spawning.
Can you tame Phantoms in Minecraft?
Phantoms are undead Minecraft mobs that players can see flying around the world pretty commonly. These are airborne hostile mobs, and they are pretty fast also. ... One thing that players may not know is that phantoms can be tamed in Minecraft.