Minecraft wiki entry for Villager, associated text: In Java Edition, villagers panic if they see a mob that is hostile toward villagers, like a zombie, zombie villager, husk, drowned, zoglin, illager, vex, wither, or ravager and flee frantically from them, sometimes hiding in houses. In Bedrock Edition, villagers panic by running around in circles around a bed in a village house, such as when a raid happens or when the player rings the village bell. Java Edition villagers in panic are more likely to summon iron golems. To see these mobs, the villager must have an unobstructed line of sight to it (eye-level to eye-level), and be within a certain range (spherical distance between feet center bottom-most point of the villager and hostile mob):