Minecraft wiki entry for Villager, associated text: Iron golems that were not built by a player become hostile towards players whose reputation with any nearby villager is -100 or lower. The golem checks all villagers inside a box centered on the golem and extending 10 blocks in every horizontal direction and 8 blocks in both vertical directions.