Minecraft wiki entry for Survival_in_an_infinite_desert, associated text: Find every house with a bed and mark it (e.g. with sand and a cactus on top) - villagers live in it, so it's a priority for protection. Find the houses without beds - unoccupied houses. Take any torches or other light sources from inside or outside of the unoccupied houses and block (fill) the doorway with one or two sand blocks so no villager or mob can enter. Redistribute all the light sources in the village evenly so that the occupied houses at least are lit, and preferably the areas inside your wall/trench system are also lit. If you don't have enough torches, move the beds (and some doors) from some of the houses and add them to one central house. This should move the villagers to that central house, keeping them closer together and easier to protect. Alternatively, move all beds, light sources, and doors to the largest most central building to concentrate the villagers in one protected and easy-to-defend place.