Minecraft wiki entry for Iron_golem_farming, associated text: Farm designs that do not allow villagers to access their beds may experience center-shifting and possibly lower spawning rates unless they prevent villagers from unlinking from the beds at night. To prevent a villager from unlinking, you can either place water on its feet, or prevent it from attempting to pathfind by surrounding it with blocks.