Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-911

Sunlight in big caves and under overhangs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: 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
    • Fix Version/s: None
    • Environment:
      Win 7 64Bit with Java 7 but this doesn't matter for that bug.
    • Confirmation Status:
      Community Consensus

      Description

      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]

        Attachments

        1. 2012-09-20_10.56.35.png
          408 kB
          asdf
        2. 2012-10-25_13.56.56.png
          377 kB
          asdf
        3. 2012-10-27_18.50.00.png
          345 kB
          Sascha Baer
        4. 2013-01-30_13.47.33.png
          915 kB
          Jonathan Levasseur
        5. 2013-01-30_13.47.48.png
          980 kB
          Jonathan Levasseur
        6. 2013-02-07_11.57.19.png
          905 kB
          Jonathan Levasseur
        7. 2013-02-07_13.02.41.png
          470 kB
          Andrew Thomas
        8. 2013-02-08_18.16.57.png
          535 kB
          Andrew Thomas
        9. 2013-07-20_15.34.48.png
          193 kB
          Zack Ridley
        10. 2014-02-03_22.15.16.png
          180 kB
          Vincent Reed
        11. black 1.6.4 after.png
          1004 kB
          jonathan2520
        12. black 1.6.4 before.png
          1.07 MB
          jonathan2520
        13. black 1.6.4 block light.png
          1.00 MB
          jonathan2520
        14. black 1.6.4 punched.png
          1.36 MB
          jonathan2520
        15. black 1.6.4 up close.png
          1.41 MB
          jonathan2520

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bonehead Sascha Baer
              • Votes:
                148 Vote for this issue
                Watchers:
                26 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: