Minecraft wiki entry for Tips_and_tricks, associated text: If you read about trapdoors and fences, you will know that mobs cannot jump over open trapdoors and no player or mob can pass over fences without the jump boost effect. You can completely surround your base with trapdoors or fences and open the trapdoors if you do not want to place fence gates. Note that flying mobs, such as withers, ghasts, or phantoms, can still enter your base territory.