An iron golem is a large defender with the entity ID minecraft:iron_golem. It patrols villages and attacks many hostile mobs. A village golem can turn against a player who threatens the village. A golem built by a player has different targeting rules.
Iron golems can appear in villages. In Java, eligible villagers can summon one through their village behavior, which includes panicking or gossiping. In Bedrock, village spawning uses a village-wide check involving villagers, beds and recent work. Mojang's Bedrock spawning rules describe a minimum of 20 beds, a bed for every villager, and at least 75% of villagers having worked in the past day. Some pillager outposts contain a captive iron golem that can be freed to fight pillagers.
Place four iron blocks in an upright T, with three blocks across the top and one beneath the middle. Place a carved pumpkin on top of the middle block to complete the golem. This assembly takes place in the world.
Iron golems fight in melee. A hit can lift its target into the air. They defend villagers from threats such as zombies. In Java, a village golem can retaliate after being hit and can target a player whose reputation with nearby villagers is sufficiently low. The player-created flag prevents it from attacking players.
The Bedrock definition separates the two origins. Village-created golems have a village-defense target goal that can select players. Player-created golems have a retaliation filter that excludes players.
A damaged golem can show cracks. Using an iron ingot restores up to 25 HP. Bedrock defines 100 HP maximum health and a base attack damage range of 7–21 HP. These are entity values before the target's defenses. An iron golem may occasionally offer a poppy to a villager.
The Java and Bedrock vanilla loot tables each roll 3–5 iron ingots and 0–2 poppies on death. Neither table requires a player kill or changes those counts with Looting.
Java village spawning depends on nearby villagers' ability to summon a golem. Its village-defense goal checks player reputation. Bedrock uses village-wide spawning requirements and assigns different targeting behavior to village-created and player-created golems.