Light



Lighting in Minecraft affects visibility, Mob spawning, tree growth, and whether flowers and mushrooms will stay planted. Lighting can be provided by sunlight, torches, fire, lava, in-use furnaces, and other certain objects.

History
Each edition of Minecraft uses a different lighting model. Classic’s model is simple and only checks whether a block is exposed to the sky. Indev’s model is more complex and considers a block’s distance from the nearest sunlight and from the nearest light-emitting block. Alpha’s model is a refinement of Indev’s, calculating sunlight and block-emitted light separately and using a different scale of light intensities. Beta improved upon Alpha's model by adding the smooth lighting option.

Classic
In Classic, “sunlight” is emitted by the top edge of the map and will hit any block that is under it. It will pass through transparent blocks to light blocks underneath. Blocks that do not receive light are in a dim shadow that remains at the same level of brightness no matter how far they were from a light source.

Indev/Infdev
In Indev and Infdev versions there are 16 degrees of brightness, with a maximum of 15 for full daylight and a minimum of 0 for almost complete darkness. Brightness is a linear scale and represents its value divided by 15, so for example 15 is 100% ($15/15$) and 13 is 86.67% ($13/15$).

Each block that emits light has its own luminance value and the light value diminishes by one level each block from its source. If the neighbouring block already has a greater light value, it is ignored. The process is repeated for each block whose light value just changed.

During the day, sunlight has a maximum light value of 15. At dusk, it steadily decreases until it reaches a night-time minimum value of 4 representing moonlight. Sunlight is emitted by the top edge of the map, but does not diminish with distance from its “source”. A block lit by sunlight will be equally bright at any height or depth.

Alpha
Lighting in Alpha works as Indev and Infdev, except that the scale is different and is not linear.

Full daylight provides the maximum brightness of 15. Each value below this is 80% as bright as the one above it. For example, 14 is 80% as bright as sunlight, and 13 is 64% bright. This means that Level 0 still has 0.8¹⁵·100% = 3.5% of the maximum brightness.

Sunlight in Alpha have their own light array and a behind-the-scenes optimization to make dawn and dusk smoother: the amount of light from the sky is pre-calculated and saved along with the blocks, because it never needs to change except when blocks are added or removed. During dusk, nighttime, and dawn, a "darkness" value is subtracted from the sky to create the effects of different times of day.

In the Nether, light decreases by 10% each level, rather than the normal 20%. This means it will never be totally dark in the Nether. The minimum light value is 20.59%, providing a permanent dim ambiance equivalent to normal world's level 8.

Beta
Lighting in Beta works the same as how it was in Alpha, but is greater optimized to allow smooth lighting. This does not affect the gameplay as it is just a graphics tweak. It creates the effect of making blocks go gradually darker or brighter, and it makes the blocks look smoother, hiding the edges of each block.

This was originally a mod by MrMessiah, which was later implemented into the game.

Players who chose to have the old lighting system may do so in the Options under Graphics.

Smooth lighting also makes blocks look a little darker than the original system.

Effects of light

 * Hostile mobs, excluding slimes, zombie pigmen and ghasts, require a light level of 7 or less to spawn.
 * The Halloween Update version 1.2.0 allowed monsters to spawn in higher light levels at lower depths, using the formula 16 - (Layer ÷ 8). At level 8 and below, mobs could spawn even in sunlight. Notch reverted mob spawning to the original method in version 1.2.1, saying, "it was far too annoying. I have plans on what to do with this."
 * Planted Flowers and Saplings will stay in the ground at light level 8 or higher. They will also stay in the ground if there are no blocks between them and the sky, regardless of light level.
 * Mushrooms only survive at light level 12 or less.
 * Snow and ice will melt at light level 12 or higher, and won't form at light levels above 10. Sunlight is ignored.
 * Trees will grow if the light in the block above a sapling is 9 or higher.
 * Crops will only grow in light level 9 or higher.
 * Grass will only spread in light level 4 or higher.
 * Ambience is triggered by chambers at least 3x3 that are entirely at light level 8 or lower.

Light-emitting blocks
The following values are the brightness of the block itself. The light emitted decreases by one for each square of distance from the light source. Glass does not diminish the light that passes through it, but water or ice reduces light that passes through it by 3 (2 for passing through +1 for normal block decrease). In Minecraft's source code, the luminances are defined using the floating point values in the third column. In a weird quirk, these floating point numbers are fractions of 16, but are multiplied by 15 to get the integer light value. This means that both 0/16 and 1/16 (0.0 and 0.0625) correspond to the integer light value 0.

* A bug exists where brown mushrooms reset the light level of the tile they are on to exactly level 1, even if the tile is meant to be brighter by other means. In other words, their presence can reduce an otherwise brighter tile's light level. This problem has also appeared for redstone torches.

Non-Opaque Blocks


Transparent blocks do not affect the light spread, unlike solid ones which will stop the light from being transmitted any further. This includes glass, water, ice, portal interiors, and so forth. See Opacity for a full list.

Certain blocks will only allow light to pass through diffusely. These are water and ice, which reduce light by an additional 2 levels per block, and leaves, which diffuse sunlight but only reduce light by the normal 1 level per block.

Bugs

 * When smooth lightning is turned off, the stairs will be partially dark. This happens also when a block is placed on the top of a bed or a slab. The space between the bed and the placed block becomes dark.
 * There is a bug where the lighting will not update properly, resulting in areas being unusually dark. This can be fixed by placing a light emitting object (such as torches, glowstone, etc.) or destroying a block in the area.2011-06-17 19.21.19.png

Future

 * Originally, Minecraft 1.7 was to support newer, fancier lighting effects. It was originally mentioned in this tweet. Example and at night Example  It is now announced that as 1.7 was getting an earlier release, new lighting would not be included, instead it will be released in 1.8