Minecraft 1.4.1, Minecraft 1.4.2, Minecraft 1.4.3, Minecraft 1.4.4, Minecraft 1.4.5, Snapshot 12w50a, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w04a, Snapshot 13w05b, Snapshot 13w06a, Snapshot 13w07a, Snapshot 13w10b, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.5.2, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w38a, Minecraft 13w38b, Minecraft 13w38c, Minecraft 13w39b, Minecraft 13w41a, Minecraft 13w41b, Minecraft 1.7.4, Minecraft 14w04b, Minecraft 14w05b, Minecraft 14w06a, Minecraft 14w06b, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w10b, Minecraft 14w10c, Minecraft 1.7.9, Minecraft 14w18b, Minecraft 14w19a, Minecraft 14w21b, Minecraft 14w32d, Minecraft 15w42a, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 1.9.4, Minecraft 1.10
Win 7 64Bit with Java 7 but this doesn't matter for that bug.
In bigger caves and under overhangs you get sunlight as if there were no ceiling - mobs start bruning and the floor gets lit up.
This bug is 100% reproducable and not even hard to fix once you understand it:
Chunks get split in 16x16x16 Sections.
If a Section is empty it gets deleted from the save to make the world smaller (as in how much space it takes on the Harddrive). Sections in the same chunk assume that they must be exposed to sunlight if there is an empty (and thus deleted) section above it and act as if they were, creating ugly patches of light in big caves. This bug is almost exclusive to custom maps, since the terrain generation almost never produces caves that are big enough, but it is a gamebreaker in maps (makes them too easy and look ugly).
To fix this bug you don't have to rewrite the whole lighting system - simply let the sections check the whole chunk when calculating sunlight.
To recreate the bug, make an empty chunk (create a superflat world to speed this up) and put a ceiling at least 16 blocks above the ground, big enough to block all sunlight. Then restart the game. Now there should be sunlight (if it doesn't happen, raise the ceiling a bit, maybe it's still in the same esection) [NOTE: if it doesn't happen, try going away far enough to unload the chunk, wait a few seconds and then go back to it]
MC-80966 Lightcalculation of ChunkSelection faulty implemented resulting in client bugs (empty chunks don’t show light/render dark)