miuradio
How It SpawnsThe tricks inside famous games, shown running.›

How It Spawns

Why does a Minecraft enderman attack when you look at it?

Premieres today. Follow to see it first.

Story

It isn't watching you. The game is watching your crosshair. In Minecraft, Java Edition, every tenth of a second the game draws a line from your eyes to the enderman's eyes and checks how far off your look is. The miss it allows gets smaller as an angle the farther away it is, but bigger in blocks: at 5 blocks the circle round its eyes is about a block across, its head and shoulders; at 48 blocks it is 3.1 blocks across, wider than the enderman is tall. So up close only its face sets it off, and across a desert a look past its shoulder does.

It has to be within 64 blocks with nothing solid in the way, and your look has to hold for three checks in a row, a fifth of a second; look away sooner and it lets it go. Then it screams, and distance decides. Between 4 and 16 blocks, while you stare it stands still and stares back; look away and it runs at you. Farther than 16, look away for a second and a half and it teleports 16 blocks toward you. Stare at it from closer than 4 and it teleports away, to a random spot up to 32 blocks off. Wear a carved pumpkin and the game never runs the check at all. Endermen can even carry carved pumpkins around.

The numbers are Java Edition 26.3's (LivingEntity.isLookingAtMe: your view against the line to its eyes must beat 1 - 0.025 / distance). The desert and the figures are our own simplified version, drawn in code (in ours, an angry enderman past 16 blocks waits for its teleport; in the game it also runs at you).

Notch, who made the enderman, wrote in 2011 that creepy is about trying to avoid something: "When they attack, you know it's your fault."

So, would you wear the pumpkin?

Sources: Minecraft Java Edition 26.3, Mojang's code: Enderman, its EndermanLookForPlayerGoal and EndermanFreezeWhenLookedAt, LivingEntity.isLookingAtMe, EndermanModel, the gaze_disguise_equipment and enderman_holdable tags; Notch, "The psychology of the reticle and the feeling of control", his blog, 29 July 2011.
Not an official Minecraft video. Not approved by or associated with Mojang or Microsoft.
Sounds and music: our own, made in code.

Link copied