Minecraft wiki entry for Door-based_iron_golem_farming, associated text: 7. Seal off the backs of the windows, and build some small cups to hold the villagers. The cups should be 4×4 on the outside, so there is 2×2×3 of air on the inside. Make sure that there are at least 10 villagers altogether and note that adding villagers after reaching 30 will have no effect on the efficiency of the farm.