Iron Golem

Iron Golems are large, strong utility mobs. Their main purpose is to defend Villagers in NPC Villages from hostile mobs and siege attacks.

Creation
Iron Golems will automatically spawn in NPC Villages naturally, provided there are 16 adult Villagers and at least 21 houses. It does not have to be a naturally generated village; as long as there are 16 adult Villagers and 21 houses, an Iron Golem will spawn. The chance of spawning every tick is 1 in 7000.

The golems cannot be crafted but the player may create them using blocks in a similar fashion to Snow Golems. To do so, the player must place 4 blocks of iron in a T-shape on the ground (or in the air), and then place a pumpkin or a Jack-O-Lantern on top. This is equivalent to 36 Iron Ingots, making creation somewhat of a task. They will always spawn facing south.

Behavior
Iron Golems roam in villages rather slowly. When provoked, Iron Golems will move toward their target at a faster rate, swinging their arms up violently once in range to attack. This does 3½ to 10 hearts damage to their target and flings them into the air. They can take damage from lava, fire, and poison. They do not take fall damage or drowning damage. Upon death, Iron Golems drop three to five iron ingots, and zero to two roses. Kills most hostile Mobs with only two throws into the air.

Iron Golems are able to hold roses and give them to Villagers, symbolizing the friendly relationship between the Villagers and Iron Golems.

Iron Golems will attack all hostile and neutral mobs if any come within their sight, except Creepers, Slimes, Magma Cubes, Wolves, and Ghasts. Iron Golems likely do not attack Creepers because of Creepers' destructive nature, which may destroy sections of the village. They will attack the player if the player attacks them first, or if the player attacks a nearby Villager (only in Survival Mode). The Iron Golem does not have to directly see the player attacking a Villager to become hostile toward the player. They do not despawn if the difficulty is switched to peaceful and will continue to attack the player.

Iron Golems have a larger than normal attack range, this causes them to be able to attack through a solid 1 block thick wall, even without line of sight to the target. If an Iron Golem generated as part of an NPC Village is killed, another will eventually spawn to take its place.

If a Golem is provoked by the player either attacking it or a villager, the Golem will become neutral again after the player runs away.

Iron Golems do not like water. To keep your personal Golem restrained, without having to use fences, make a 2 block wide river around the area you want your golem to roam. A 1 block wide river does not suffice, as the golem is able to cross this gap without actually falling into the water, thus not obstructing the golem at all. With a 2 block wide river, the golem can still be pushed in, forcing it to leave the water possibly on the wrong side, though it will not be lured across by monsters. If it so happens that a golem does enter a body of water, it will sink to the bottom, rather than swim. Also, if raining, an Iron Golem created by the player will look for shelter, and once in shelter will not move.

Iron Golems created by the player will never attack the player. Any Iron Golems generated through other means will also not defend any Villagers who are spawned by mods, only ones naturally generated in Villages.

Defense
An Iron Golem's primary purpose is to defend NPC Villages from Zombie attacks, usually during a siege. Although slow, their high health and damage prove them to be great defenders. They swing their arms during their attacks, causing enemies to be thrown into the air and usually killed in one or two attacks. Player usage might involve enclosing Golems in a large fenced-off area to prevent their wandering off, although such control of the area could be accomplished in simpler ways.

Farming


In Minecraft V1.2.3 Iron Golem farms that were made in V1.2.2 or earlier appear to not work, this was most likely caused by a change to the spawning conditions.

It is possible to make a fully automatic iron and rose farm by building a "house" (see the trap example image below for details) for Villagers to spawn in. If an area is made where only Golems can spawn in, then a trap can be set up to obtain the Golem's drop items. Golems need a 2x2 blocks wide and 4 blocks high space (even though they're only 3 blocks high) to spawn and they spawn in a 16x16x6 area (see the spawn conditions image for details) centered in the center of the village (for maximal control, no nearby [which means in a 50x50 area] houses should be made, if you're making the trap near a natural village, or your house, make sure there are no doors so they won't be classified as houses).

To be able to spawn, the village must contain more than 20 doors (21 is fine).

One Iron Golem will be able to spawn for every 16 Villagers in a village. So 16-31 Villagers spawn 1 Iron Golem, 32-47 spawn 2 Iron Golems etc.. There is no limit of Iron Golems per village.

There are several ways to kill Iron Golems and obtain their drop items. The following are the most effective ones: Note: Falling and drowning traps are ineffective as Iron Golems don't take fall or drowning damage.
 * Suffocation by a sticky piston and a block. The killing can start instantly after spawning but it will clog up the trap, making other Golems unable to either spawn or die, depending on the design.
 * By lava that won't touch the Golem's feet (since this is where the drops appear). This is the most damaging (and therefore the quickest) of the automated killing methods. An example picture of this method is shown to the right.

If the Iron Golems are dropped at least 7 blocks below the floor block(s) of the house, they will immediately be outside the village boundaries, and therefore detached from the "village," so a new Golem will be able to spawn, even before the previously village-attached Golems have died.

If there is no other spawn space available, Iron Golems will be able to spawn inside liquids, meaning an instant lava killing trap is possible, as shown on the picture to the right. Dropping the Iron Golems out of the spawn boundaries as soon they spawn, however, could be seen as preferable to this method, as it ensures a higher Iron Golem spawn rate.

The traps could have a collection area, where the player can pick up the drop items. It is possible to have multiple Golems spawn in one area to make a very effective farm.

Note: If your Villagers aren't spawning any Iron Golems and there are no other houses nearby, dropping water on the Villagers will update them, and force them to start the Iron Golem spawning, provided the spawn conditions are met.

If a player is short on resources and time but still wants to harvest the iron from Golems, the player can simply suffocate the Golems with blocks of sand or gravel. Golems are very slow-moving and tend to wait at the same spot when not patrolling a village, so it is very easy to drop 3 blocks of sand or gravel on top of them and wait for suffocation.

History
Iron Golems were first introduced in Snapshot 12w08a.

Mechanical and stomping sounds were added to Iron Golems in the 1.2 Preview.

1.2.3 The Required Number of Doors increased, from 1 to 21.

Bugs

 * If an Iron Golem attacks a group of Zombie Pigmen, the whole group won't turn hostile towards the Golem; only the one attacked will become hostile.
 * An Iron Golem riding a minecart will ignore everything, even if a target is in attack range.
 * An Iron Golem can spawn in a 2 block high area if the block above the two air blocks is glass.
 * An Iron Golem can be spawned by the player in a 1x3 blocks wide and 3 blocks high space. This will immediately make the Iron Golem receive suffocation damage and the Iron Golem stays there until 'released'.
 * Iron Golems can hit a target on the other side of a door. Their huge attack range also allows them to attack a target on the other side of a wall that is one block thick.
 * For some reason, an Iron Golem can swim out of a water pit in a case like this:
 * Iron Golems will attack wolves even when the wolves are tamed.

Trivia

 * The Iron Golem's dimensions are 2.9 blocks high and 1.4 blocks wide.
 * As the population of a village increases, more Golems will naturally spawn.
 * There is no maximum number of Iron Golems allowed per village.
 * The Iron Golems holding out roses to Villager children is a reference to the ancient robots in the Japanese anime movie Laputa: Castle in the Sky, as is the fact that the Golems are covered in vines.
 * When Villager children notice the rose in its hand, they will slowly approach, and take the flower eventually.
 * As with Snow Golems, the pumpkin must be placed last during the building process.
 * Also as with Snow Golems, there is no Spawn Egg for this mob. This is because the player can create them through other means.
 * Iron Golems will avoid water whenever possible, and unlike other mobs (apart from Slimes and Magma Cubes), it will sink to the bottom of any liquid.
 * As with Snow Golems, an Enderman can create an Iron Golem if they place a pumpkin on top of Iron blocks arranged correctly.
 * Iron Golems wobble as they walk, unique to other mobs which remain completely upright when walking.
 * Iron Golems are tied for having the second highest health points in the game, after the Ender Dragon.
 * The Iron Golem is the first mob that has its own attack animation with moving appendages.
 * The looting enchantment does not affect Iron Golems.
 * Iron Golems are passive mobs if in water.
 * Iron Golems will target Snow Golems if accidentally hit by a snowball.
 * If an Iron Golem is attacked by different mobs, it will attack the mobs in the same order that they attacked it.