Minecraft wiki entry for Iron_Golem, associated text: Although they are guardians of villages, iron golems are not actually provoked when a mob attacks a nearby villager (in contrast to a player attacking a villager). With the exception of creepers, ghasts and goats (although they still can attack ghasts if close), they are provoked when attacked by any mobs, and by the presence of nearby monsters. Even if a witch accidentally throws a positive splash potion at an iron golem during a raid, this 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.