Skip to content

Incorrect sky light in enclosed underground areas with parallel light updates (parallelism=-1) #36

Description

@LucaPisl

Describe the bug
Sky light propagates into fully enclosed underground spaces when parallel light updates are enabled. I first noticed this because hostile mobs were burning during the day deep inside caves with no sky access whatsoever, and caves were visibly lit as if the sun reached them. At night everything went back to normal (mobs spawned and didn't burn), which pointed at sky light rather than block light. To rule out rendering, I dug down to Y=45, sealed myself in a cobblestone box, and F3 showed Client Light: 14 (14 sky, 0 block). This affects gameplay, not just visuals - burning mobs means the server side light engine has the wrong values too.

Setting parallelism=1 in scalablelux.properties completely fixes it. With parallelism=-1 (default/auto) the corruption comes back in newly generated chunks. So this looks like a race condition in the parallel light update path rather than a general propagation bug.

To Reproduce
Steps to reproduce the behavior:

  1. Install ScalableLux 0.3.0-alpha.0.6 on NeoForge 1.21.1 with default config (parallelism=-1)
  2. Create/load a world and generate some fresh chunks
  3. Dig deep underground (I was at Y=45) and seal yourself in so there is no possible path to the sky
  4. Open F3 and look at Client Light - sky light shows values like 14 instead of 0
  5. Change parallelism=1 in the config, restart, repeat in fresh chunks - sky light is correctly 0

Expected behavior
Sky light should be 0 in enclosed underground areas regardless of the parallelism setting, and mobs shouldn't burn in caves during the day.

Screenshots

Image Image

(F3 screenshot inside the sealed cobblestone box showing "Client Light: 14 (14 sky, 0 block)" at Y=45)

Runtime info (please complete the following information):

  • OS: Garuda Linux (Arch Linux, kernel 7.1.5-1-cachyos)
  • Minecraft version: 1.21.1 (NeoForge 21.1.247)
  • Mod version: 0.3.0-alpha.0.6+neoforge

Crash reports / logs
No crash. latest.log: (link)

Other mods
Large modpack (~170 mods), notably c2me 0.4.0-alpha.0.104, Lithium, ModernFix, Sodium, Iris, Distant Horizons, Create. Full list: (link)

Checklist

  • I am using the official version of the mod.
  • I tried the latest development version but the issue persists. (I used the latest version I could find for NeoForge)
  • I searched for similar open issues and could not find an existing bug report on this.

Additional context
The bad sky light gets saved into chunk data, so chunks generated while parallelism was on stay broken even after changing the config - I had to run Optimize World with "Erase cached data" to repair the world. This was unreliable though, so it's not a 100% working workaround. Sometimes it fixes the world, sometimes not. Might be worth keeping in mind for anyone else who hits this. Happy to test dev builds or provide more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions