Iron Golem

"... There's at least one giant reason not to mess with villagers. Their loyal defenders that can't drown, suffer pain from falling or even be knocked back. Sentient statues that deal huge damage with just a single swing of their mighty arms. We pity you if you're caught attacking villagers – we really do – because then you've just made an enemy of the Iron Golem. Don't be surprised if that's the last thing you ever do – they're one of the hardest hitting mobs in the Overworld."

- Tom Stone

Iron golems are large, strong utility mobs that defend players and villagers.

Villages
$$, an iron golem spawns based on villager gossip at a gathering point. The villager who starts the gossip must have a profession that is not nitwit, slept in the last 24000 ticks, been to their job site block in the last 36000 ticks, gossiped 5 times about the need for an iron golem, and have two other villagers within 80 blocks. The iron golem then has a chance to spawn in a 16×13×16 cuboid area centered above and below the location of the villager who spread the gossip. Iron golems can spawn inside transparent blocks, stairs, carpets and half-slabs as long as there is a full block underneath them. Iron golems require at least a 1×3×1 space to spawn, even if their spawning results in their own suffocation and death. Iron golems are able to spawn in water. Additionally, when three different villagers see the same zombie during a span of 10 seconds, an iron golem is likely to spawn as long as those villagers meet the above requirements for gossip-based spawning.

Villagers can also spawn iron golems when they enter a panicked state, haven't seen a golem in the past 600 ticks in a 16×16×16 cuboid centered on the villager, have worked in the last one and a half in-game days or slept within the last in-game day, and have at least two villagers nearby in a 10×10×10 cuboid around them. All 4 of these conditions must be true for all villagers in the 10×10×10 for a golem to spawn from panic.

Villagers enter a panicked state based on the line of sight, not general distance. Each mob also has a different radius for frightening villagers.

$$, an iron golem can spawn naturally when a village first generates in the world. Iron golems also spawn in villages having at least 21 beds and 10 villagers, in a 16×6×16 volume around the village center defined by a bed, a bell, or another meeting point. The chance of spawning is $1/7000$ per game tick, which averages to one every 5 minutes and 50 seconds. Iron golems can spawn provided the blocks it spawns in are non-solid and the block it spawns on has a solid flat top surface.

Creation
Iron golems are created by placing four iron blocks in a T shape (as shown in the image), and then placing a carved pumpkin, a jack o'lantern or a pumpkin on top of the center upper block. The pumpkin may be placed by the player, a dispenser or an enderman, but it must be placed last. It needs space around it to be able to spawn and cannot spawn in a confined area. $$, the player must also use shears on the pumpkin to begin the transformation.

The block arrangement can be placed upright, lying down, or upside-down. The four empty spaces in the diagram (above and below each of the arms) must be air blocks. Any non-air block (including blocks such as snow layers, tall grass, and water) present in any of the empty spaces prevent the golem from spawning.

Like other constructed mobs, iron golems always spawn facing south. Their large size may cause them to take suffocation damage from nearby solid blocks at the level of their head.

Pillager outposts
Iron golems can also be found surrounding pillager outposts, trapped inside of dark oak cages. When freed, they help the player by attacking the mobs.

Drops
Iron golems drop when they die: The Looting enchantment is ineffective against iron golems as it does not give any extra iron ingots or poppies when killed.
 * 3–5 s
 * 0–2

Behavior
Iron golems wander around a village in a patrol-like fashion, staying close to the edges of buildings and other structures. Like villagers, iron golems do not wander away from a village, regardless of how they were spawned. An iron golem sometimes faces a villager as if they are speaking to each other. Iron golems are able to spawn poppies in their hands and offer them to villagers, symbolizing the friendly relationship between the villagers and golems.

If not within a village, iron golems slowly wander around, usually making their way to a nearby village.

Iron golems can walk up a full block height without jumping and walk over a 1 block wide hole without falling in. They avoid water, lava, fire and cacti. Iron golems are immune to both drowning and fall damage. When in water, they sink, but can still move freely when in and underwater.

$$, when they're at 3/4 of full health, iron golems start to crack. An iron golem can be healed when the player right-clicks the chest of the iron golem with an iron ingot.

Like all utility mobs, iron golems can be leashed.

Attacking
When provoked, an iron golem moves quickly toward its target and swing its arms up violently to attack, dealing to  damage and flinging the target into the air. Iron golems have a comparatively large attack range, allowing them to attack through a solid 1 block thick wall, even without a line of sight to the target.

It is possible for multiple golems to simultaneously hit the same target. The height to which the victim is sent flying is relative to the number of golems that attack it.

Iron golems attack most hostile or neutral mobs within 16 blocks of them, although they are not effective on flying mobs (ender dragon, wither, phantom) that don't venture into the iron golem's reach. Additionally, the pufferfish is the only passive mob they attack should either get close to the other.

This list is incomplete; you can help by [ expanding it].

A naturally-spawned iron golem knows where raiding illager locations are from behind solid walls and from underground and attempts to move toward them. An iron golem created by the player or summoned by a command cannot detect raiders through obstructions.

Being attacked
Zombies (and variants), skeletons (and variants), spiders, cave spiders, slimes, magma cubes and illagers naturally attack iron golems on sight and may cause major damage, especially if the mobs attack in groups. If an iron golem is attacked by multiple mobs, it retaliates in the order it was attacked. $$, endermites, silverfishes and witches may naturally attack it too.

Iron golems have 100% knockback resistance. However, they can be knocked back by the Knockback enchantment on swords and the Punch enchantment on bows.

Cracking
Iron Golems have different stages of being cracked to show their health. When their health is above, some cracks are visible. When their health is between and, a few more cracks appear. When their health is between and, they appear more cracked. When their health is lower than, many cracks are visible.

Healing
$$, an iron ingot on an iron golem restores its health by 25%.

Data values
Iron golems have entity data associated with them that contain various properties of the mob.

Trivia



 * The iron golem's holding out flowers to villagers is a reference to the ancient robots in Hayao Miyazaki's animated film Laputa: Castle in the Sky. When villager children notice the poppy in its hand, they slowly approach, and take the flower eventually. Iron golems do not actually pick up poppies; they spawn them in their hands.
 * Tamed wolves continue to attack iron golems even after the iron golems have turned passive toward the player.
 * If a player throws an ender pearl at an iron golem that has spawned in a village, it becomes hostile.
 * Even if it has a poppy in its hands, the iron golem can still hit a hostile mob.
 * If an iron golem is in a boat, no other entities except for a player can ride as a passenger or control the boat.
 * According to the illustrations in Mobestiary, the iron golem may, in fact, be a machine, following its original inspiration.

Publicity

 * The iron golem is a purchasable avatar item on the Xbox 360 Marketplace.