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

Sunlight in big caves and under overhangs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 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.
    • Community Consensus

      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]

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

            Unassigned Unassigned
            bonehead Sascha Baer
            Votes:
            148 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: