Minecraft wiki entry for Legacy_village_mechanics, associated text: Villagers recognize a house within sixteen blocks along both horizontal axes, and up to three blocks above or five blocks below the level of the ground the villager is standing on: