How far do I have to place torches so that mobs will not spawn near me?
Learn about light:
- Sunlight gives 15 luminance to the blocks it hits directly, or through half steps.
- Lava gives 15 luminance.
- Glowstone gives 15 luminance.
- A Jack-o-lantern gives 15 luminance.
- A Torch gives 14 luminance to the otherwise empty block it occupies.
- A Redstone torch gives 7 luminance to the otherwise empty block it occupies.
Every tile that isn't a light source has a luminance of one minus the luminance of its neighbors. For example, if you had a 6 and a 4 luminance sources close to each other, attached to a wall, you'd have this distribution:
1 121 1 12321 121 1234321 1232123454321 123432345654321 12┴─────┴4321 1 12321 121 1
...except this works in three dimensions instead of two!
Learn about spawning:
- The following applies to any difficulty, except for Easy.
- Every tile within 24 distance of the player is not eligible.
- Every tile outside a 144×144 square centered on you is not eligible.
- Every non-glass, non-half step surface in the outer world with 7 or less luminance is eligible for spawning.
- Every non-glass, non-half step surface in the Nether is eligible for spawning.
- Mob spawners cause mob to spawn at a high rate in any surface within 5 distance of it.
In practice:
Here's what I try to do to ensure a luminance of 7 consistently along a line:
Place the first torch. Pardon my hexadecimal one-sided luminance graph:
EDCBA98765432100000000000000000 ↑
Proceed until you find two tiles looking exactly like the next, then go back one.
EDCBA98765432100000000000000000 ↑
Plant a torch there. Lo and behold, minimum luminance there will be 8!
EDCBA9889ABCDEDCBA98765432100 ↑
GOTO 1
You can adapt this algorithm to your necessities with ease. Just plant a torch in the darkest area when in doubt. (Duh.)
Also:
- Put torches directly onto surfaces for best results.
In your mining, be aware that any surface is good enough to spawn...
↓↓↓ ↓↓ All positions marked with an arrow are valid ███ ██↓ spawning points, to the best of my knowledge, █ █↓ and they all can lead to the just spawned mob █ █ to reach you. █ ↓█ █↓↓↓↓↓█ Be vigilant and don't mine caves from the ███████ bottom up :(
Learn how to keep mob that has spawned outside: make traps.
- Mobs can only jump up one tile. Make pits deeper than that and, once in, they will be trapped (skeletons are still dangerous and spiders can climb out).
- Mobs cannot deconstruct. Make walls. (Be aware creepers do explode, if they get close enough.) Use cobblestone: they have high explosion resistance and can't catch fire.
- Mobs cannot use items. Protect your entrance with a wooden door. Plant it from the outside, or skeletons will be able to hurt you with their arrows!
- Mobs' path finding is somewhat dumb. Protect your spawn point with water and liberal amounts of cactus (arrange them in a chequered pattern.)
Torches Provide a light level of 14. Note that this is to the block that they are in. Adjacent blocks have a light level of 13. Mobs require a light level of 7 or less to spawn. This means that mobs can't spawn within 7 of a lit torch. So placing a torch every thirteen tiles will keep a hallway lit.
T____________T
01234567890123
You can expand this to two dimensions by placing a second line of torches 7 to one side and offset by seven.
T____________T______
____________________
____________________
____________________
____________________
____________________
______T____________T
See this post
In a straight hallway torches placed on the floor can be 13 spaces apart safely. But in an open area they should be 12 spaces apart, then offset 7 spaces and then 6 spaces, not 7 and 7.
This is confusing until you draw it out. In my examples below the grid on the left is the previously recommended and incorrect 13/7/7 offset; notice how it results in squares with 7 luminance that trigger mob spawns. The grid on the right is the correct 12/7/6 offset resulting in minimum 8 luminance across the board. The green bordered area shows how both 12 or 13 spaces apart are fine for a straight line.
This assumes a level area. YMMV on uneven terrain or elevation changes, so you'll have to double check darker squares' luminance using F3. Once it gets level again you can resume the righthand pattern above.
Likewise the 13 spaces from torch to torch (for 12 lighted spaces between) in a hallway assumes a straight line and torches placed on the floor. Torches placed on the wall are not as efficient, requiring 11 spaces torch to torch (for 10 lighted spaces between). Any turns affect the count.
For an extreme example, torch performance in diagonal/zigzag hallways also depends on where you place the torches. Torches placed on the floor are most efficient by far, illuminating their floor square at 14 and safely lighting 12 intervening spaces between torches. Torches placed on the walls are dimmer and must be closer together, only illuminating the floor squares under them to 13, and safely lighting only 9 intervening spaces! So if you're short on torches place them on the floor.