Iron Golem

An iron golem is a large, strong, neutral utility mob that defends players and villagers.

Villages
$$, villagers can summon iron golems, either when they are gossiping or panicking. When a villager tries to summon a golem, up to 10 attempts are made to spawn a golem within a 16×13×16 box centered on the villager (villager block position +7/−8 blocks along x/z axes and +6/−6 blocks along y axis). A random y column is picked and then the topmost block in that column is selected that is air, water, or lava, and has a "solid-blocking" block underneath, or block at y=+6 if none such is available in that column. The target location is then checked whether the block underneath has a solid top surface (which is not the same as "solid-blocking"). The target block and 2 blocks above must not be a full block, nor be redstone-powered, nor be rails, and the two blocks above must not be water. This means the iron golem can spawn inside 1-deep water or inside blocks like slabs, fences, and carpets (if other checks pass). Adjacent blocks are irrelevant, so golems can spawn partially inside adjacent solid blocks. However, the spawning iron golem still must not collide with any existing entities.

$$, an iron golem can spawn naturally when a village first generates in the world. Iron golems also spawn in villages having at least 20 beds and 10 villagers. The golem will attempt to spawn in a 16×6×16 volume around the village center defined by a bed, a bell, or another meeting point. For a village to spawn iron golems, 75% of the villagers in the village must have worked in the past day, 100% of the villagers must be linked to a bed, and a player must be within 80 blocks of the village horizontally and within 44 blocks vertically. The chance of attempting a spawn is $$ per game tick, which averages to one spawn attempt every 35 seconds. Iron golems can spawn provided the 2×4×2 space above the spawn point (that is, horizontally centered on the northwest corner of the block it spawns on) contains only non-solid blocks, and the block it spawns on is solid. If the village's original iron golem is killed, a new one cannot spawn unless all of these conditions are met; therefore, small villages do not regenerate an iron golem unless the village is expanded.

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, jack o'lantern or 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 at least one block of space around the bottom iron block to be able to spawn and cannot spawn in a confined area, even grass can prevent an iron golem from spawning. Alternatively, the blocks can be placed in any order with an uncarved pumpkin; the player can shear the pumpkin to spawn the golem. When successfully transformed, it is naturally passive toward all players under all circumstances. It can, however, attack the player’s tamed wolves, if punched accidentally, but it never directly attacks the player. The constructed golem attacks hostile mobs like a naturally spawned iron golem.

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, 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, confined inside dark oak cages. When freed, they can help the player by attacking any nearby pillagers. Pillagers won't try to attack iron golems in cages, although the iron golem can attack any pillagers that are one block near the cage, since iron golems can attack through one block wall.

Drops
Iron golems drop when they die:
 * 3–5 s
 * 0–2

Killing an iron golem with a weapon enchanted by Looting has no effect on the number of iron ingots or poppies dropped. Trading prices are unaffected by the killing of iron golems; however, village popularity decreases by 10, affecting village iron golem behavior if the popularity ranges below -15.

Behavior
Iron golems wander around a village in a patrol-like fashion, staying close to buildings and other structures. Like villagers, iron golems do not wander away from a village, regardless of how they were spawned, but sometimes stand at the border of the village. An iron golem sometimes faces a villager as if they are conversing. Iron golems can spawn poppies in their hands and offer them to villagers, symbolizing the friendly relationship between villagers and iron golems. Baby villagers will accept the poppy offered by the iron golem. In Bedrock Edition, iron golems completely ignore villagers and walk like they are not there. If a villager is in the iron golem's path, the iron golem walks like normal, without staring at the villager, and pushes the villager while walking.

If not within a village, iron golems slowly wander around and attacking any hostile mobs, 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 cactus. Iron golems are immune to both drowning and fall damage. When in water, they sink, but can still move freely.

$$, when an iron golem's health reduces to 75%, cracks appear on its surface. An iron golem can be healed when the player right-clicks the chest of the iron golem with an iron ingot.

As with all utility mobs, iron golems can be leashed. The leashed iron golem does not try to break from the lead when it sees a hostile mob. Instead, it looks at the mob while moving. An iron golem that is leashed in mid-air moves its arms and legs while moving. If an iron golem is leashed to a fence, it attacks the hostile mob but does not follow the mob if the hostile mob goes out the attack range, as the iron golem cannot break free from fence leads.

In Java Edition, when iron golems move when provoked, they look like if they're taking strides towards the mob. Iron golems that aren't provoked move slower in Java Edition. Iron golems move faster $1/700$, as it walks like its normal walking speed, either when provoked or not provoked.

Iron golems cannot pick up weapons or armor, but the player can use nbt commands in Java Edition to give the iron golem weapons or armor.

Attacking
When attacking, an iron golem moves quickly toward its target and swings its arms up violently to attack, flinging the target into the air, and dealing to  damage in Normal difficulty. Iron golems have a large attack range, allowing them to attack through a solid 1 block thick wall, even without a line of sight to the target. When an iron golem attacks, it also deals a long knockback range. Iron golems cannot attack targets that are four blocks high above the same ground level as the golem.

It is possible for multiple golems to hit the same target simultaneously, flinging the victim to a height proportional to the number of golems that attacked.

If an iron golem attacks a group of zombies, for example, it targets one zombie to attack until that zombie dies before it attacks a different zombie, even while other zombies are attacking at the same time. The iron golem attacks hostile mobs that attack it in order.

If the mob is flung out of sight, the iron golem attacks the next mob that attacks it. Sometimes, the iron golem might attack the nearest hostile mob if they are in groups.

When an iron golem kills any mob, the player can obtain items dropped by the mob, but no experience orbs. Iron golems that kill a raid mob in Bedrock Edition also causes the mob to drop its raid loot, even when the mob wasn't attacked by the player before it's killed.

Iron golems never attack each other, as iron golems cannot "accidently" hit another iron golem when attacking.

Provocation by players
An iron golem built by a player never attacks the player that built it, even when hit or when the player attacks another villager or another golem in front of the player-built golem. Player-built golems do not attack the player if they have a popularity of -15 or less. A player-built golem does not attack the player that built it, but it may attack other players if provoked. Player-built golems will attacks the player's tamed wolf if the wolf attacks the golem.

A naturally-spawned iron golem becomes hostile toward a player who attacks a villager near an iron golem. Also, if a player has -15 popularity or less in a village, naturally-spawned iron golems become forever hostile to that player until the player's popularity goes above -15.

A village iron golem retaliates when attacked by a player (even throwing an ender pearl at an iron golem provokes it). If a village has two naturally-spawned iron golems and a player attacks one in front of the other, both iron golems may become hostile to the player.

Throwing a positive splash potion or a positive lingering potion does not anger Iron golems.

Provocation by hostile mobs
Although they are guardians of villages, iron golems aren't actually provoked when a hostile mob attacks a nearby villager (in contrast to a player attacking a villager). They are provoked when attacked by hostile mobs, and they are provoked by the presence of certain hostile mobs within 16 blocks (see table below). Even if a witch accidently throwing a positive splash potion at an iron golem during a raid does not stop the iron golem from attacking the witch. Iron golems are ineffective against flying hostile mobs that don't venture into the iron golem's reach, such as phantoms.

The list below contains all mobs including players. The iron golem also attacks neutral mobs or hostile mobs that only attack the player such as piglins or zombified piglins.

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. Iron golems also looks down or looks up if the hostile mob is above or below the iron golem.

Being attacked
Zombies (and variants), zoglins, skeletons (and variants), spiders, cave spiders, slimes, magma cubes, withers, and illagers naturally attack iron golems on sight and may cause major damage, especially if the mobs attack in groups. $$, silverfish and witches may naturally attack it too.

$$, iron golems have 100% knockback resistance from normal attacks. They can still be knocked back by the Knockback enchantment on swords and the Punch enchantment on bows. $$, the Knockback or Punch enchantments have no effect on iron golems, as it only hurts the iron golem.

Cracking
Iron golems have different stages of being cracked to show their health. When their health is above, some cracks become 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.

Preferred path
Like villagers, iron golems $$ use a strategy of pathfinding that prioritizes walking on certain "low-cost" blocks. Iron golems attempt to walk on a one-block-wide path, despite them being two blocks wide. An iron golem favors a wider path if it sees one.

Climbing
Iron golems can climb ladders or vines if the ladder or vine is in its path, or if pushed onto a ladder or vine.

ID




Entity data
Iron golems have entity data associated with them that contain various properties.

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.
 * Iron golems do not get into boats or minecarts on their own, although $$, pushing a minecart on rails into a golem forces it into the minecart.
 * It is possible for an enderman to cause an iron golem to spawn by placing a pumpkin in the correct position on an arrangement of iron blocks previously placed by the player.
 * The iron golem is a purchasable avatar item on the Xbox 360 Marketplace.
 * Iron golems can attack pillagers (with no weapon) and giants with no amount of damage inflicted from either mob at all. They are the only two mobs to have that distinction.
 * It is impossible to spawn an iron golem holding a poppy using a command (such as  or  ). Its NBT matches with a naturally generated golem, but does not visually update.