Monday, August 8, 2011

How far do I have to place torches so that mobs will not spawn near me?

Question

Since torches prevent mobs from spawning, is it possible to place enough torches within a specific radius to ensure safety during the night? I'm thinking of a situation without any shelter built, more along the lines of a flat plain. If it is possible, how many torches/how far out do I need to go to make that area safe?

Answer

  1. Learn about light:

    • Sunlight gives 15 luminance to the blocks it hits directly, or through half steps.
    • Lava gives 15 luminance.
    • Lightstone gives 15 luminance.
    • A jack-o-lantern gives 15 luminance.
    • A candle gives 14 luminance to the otherwise empty block it occupies.
    • A redstone candle 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!

  2. Learn about spawning:

    1. The following applies to any difficulty, except for Easy.
    2. Every tile within 24 distance of the player is not eligible.
    3. 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.
    4. Mob spawners cause mob to spawn at a high rate in any surface within 5 distance of it.

  3. In practice:

    Here's what I try to do to ensure a luminance of 7 consistently along a line:

    1. Place the first torch. Pardon my hexadecimal one-sided luminance graph:

      EDCBA98765432100000000000000000
      ↑
      
    2. Proceed until you find two tiles looking exactly like the next, then go back one.

      EDCBA98765432100000000000000000
                   ↑
      
    3. Plant a torch there. Lo and behold, minimum luminance there will be 8!

      EDCBA9889ABCDEDCBA98765432100
                   ↑
      
    4. 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 :(
      
  4. 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.)

No comments:

Post a Comment