Minecraft wiki entry for Survival_with_no_enabled_data_packs, associated text: That's the first defensive measure. Once that is done you can build 2-high walls or 2-deep trenches at the limit of light range (7+) to prevent any spawned mobs from entering the inner part of the village. Once that is done, if you are staying a long time, consider spider-proofing these defenses (with overhangs). At that point, you might be able to consider letting the villagers out of the main building, but don't underestimate their creativity in getting killed. Make sure there is no gate or door leading outside the village 'compound'. Leave some kind of block obstacle for exit/entrance to the village that only you can remove. Make it a couple of blocks, in case an enderman removes the critical block.