Minecraft wiki entry for Survival_in_an_infinite_desert, associated text: The 3 block margin around the edge is to stop creepers blowing up your house if they explode at your perimeter line. Put a bridge across this trench (or a "doorway" in the wall) only one block wide and block it at night, or whenever you are away from your house, with at least one cactus on the inward side. Make sure there are no loose blocks down in your trenches (or up against your walls); ensure that the barrier is fully two deep / two high everywhere (except at your cactus-protected bridge or doorway). Otherwise, mobs can cross any gap in the ditch or wall where it is only one block deep or one block high. Mobs may fall into the ditch, in which case you can easily (though slowly) kill them with your fist.