Phantom

"This manta-ray–like monster is a flying creature that spawns at high altitudes. It is attracted to insomnia, and will find players who haven't slept for many days. It will swoop down in groups and bite your flesh."

- Jens Bergensten

Phantoms are undead flying hostile mobs that attack players who haven't entered a bed in over three in-game days.

Spawning
Phantoms spawn in the Overworld at night, or at any time during a thunderstorm; high above players that have not entered a bed for at least three in-game days. Phantoms will spawn more often the longer a player has gone without entering a bed.

For phantoms to successfully spawn, the player in question must be above sea level and not have a block above its head which blocks light in any way (for example leaves won't work as they have a light opacity of 2, but glass will work as its light opacity is 0).

Once the conditions are right, a pack of 1–6 phantoms attempts to spawn 20–34 blocks above the player, and off to the side by up to a taxicab distance of 9 blocks, every 60-70 seconds. The chance of a successful spawn is $x-3⁄x$, where x is the number of nights since the player last entered a bed, which comes to a $1⁄4$ chance on day 4, a $2⁄5$ chance on day 5, a $3⁄6$ chance on day 6, and so on.

Phantoms are counted towards the hostile mob cap, but don't respect it when spawning. Their spawning mechanic is based on the location of players in the world, not by randomly choosing a block near the players like regular mob spawning.

Drops
Phantoms drop:
 * 0–1 when killed by a player or tamed wolf, which can be increased by one with each level of the Looting enchantment, resulting in up to 4 phantom membrane per drop.
 * 5 s when killed by the player or a tamed wolf.

Behavior
When idle, phantoms will fly around in a circle at a constant y-elevation, leaving a trail of gray smoke while doing so. They have a quite large search radius, and will occasionally either swoop down or up quickly to attack their victim. If stopped or hurt during this action, the phantom will retreat back to its original elevation. When idle over water, the phantom will sometimes swoop into the water and will die as it is not pushed back up.

Phantoms are able to move through water at the same speed as they do normally. They cannot drown.

When under the Invisibility effect, the phantom's body will disappear, but its eyes and smoke particles will still be visible.

When under the Jump boost effect, the phantom won't fly up or down.

Like zombies and skeletons, phantoms will burn in sunlight.

Undead
Like other undead mobs, they are harmed by the Instant Health effect, healed by the Instant Damage effect, are immune to the Poison and Regeneration effects and ignored by the wither.

Data values
Phantoms have entity data associated with them that contain various properties of the mob. Their entity ID is.

Trivia

 * The phantom was added into the game as as result of winning the MINECON Earth mob Twitter poll as "Mob B".
 * Phantoms are currently the fastest non-boss mob in the game, traveling at speeds of up to 20.83 blocks per second.
 * At one point before the release of 18w10a, the phantom texture was made red, but it was decided that it appeared too much like a nether mob.
 * The phantom was originally going to have a mouth, like the sketch shown during MINECON Earth, but it was eventually scrapped because "it looked so much like a muppet".
 * Even earlier designs can be seen on Minecraft's Instagram account.