mojira.dev
MC-911

Sunlight in big caves and under overhangs

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]

Linked issues

Attachments

Comments 78

Andrew Peterson

Very big issue for custom maps with large caves and overhangs and such. Hope it gets noticed soon.

One possible way to at least prevent it from getting worse:

Instead of saying "a 16x16x16 mini chunk with no blocks is not stored", add in "a 16x16x16 mini chunks with no blocks and skylight 15 full sun exposure in all blocks is not stored.

Nicky Vermeersch

Can confirm that I have the issue as well on a linux fedora 17 machine, with 64 bit java 1.6 (IcedTea)

We cant go into the Mines of Moria!!!!!! D:

You could, it would just be surprisingly well lit.

Except, occasionally, when the lighting gets rechecked and suddenly goes dark.

(Where's the opposite bug of areas being artificially dark when loaded?)

68 more comments

Create a default superflat world. Run this command:

/fill ~-32 32 ~-32 ~31 32 ~31 stone

Only a few blocks are shadowed on the client. The server does immediately start spawning mobs. Spawning will follow a peculiar pattern along the southern and western edges, but manually placing zombies elsewhere under the roof doesn't make them burn. Apparently this is mostly or entirely a client-side bug.

This is in 1.10, by the way.

Yes, I can confirm that. I did something similar before, but it didn't work.

1. Why is this now a duplicate of a newer report? I think that's not how duplicates work?
2. This now has duplicates and is a duplicate. Can't a mod let a bot run over all the duplicates of this and change them to duplicates of the other one?

Travis Watkins

The other report has the actual issue triaged and has a Mojang developer assigned to it. To make it a duplicate of this we'd have to copy that description over here and mess with who is assigned to what which we don't like to do. As for the duplicates of this being moved to duplicates of that, yeah, that should probably be done.

Parent reports aren't always selected based on when they were reported. We at times choose other reports based on the information they provide and such.

Sascha Baer

(Unassigned)

Community Consensus

lighting, overhang, space, sunlight

Minecraft 1.4.1, Minecraft 1.4.2, Minecraft 1.4.3, Minecraft 1.4.4, Minecraft 1.4.5, ..., Minecraft 15w42a, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 1.9.4, Minecraft 1.10

Retrieved