-
Bug
-
Resolution: Unresolved
-
None
-
1.16.3, 1.16.4, 20w48a, 1.17.1, 1.18 Pre-release 1
-
None
-
Confirmed
-
Lighting
As requested, this is a copy of this comment on MC-170012, posted as a separate report.
Upon loading from disk, lightmaps are only loaded for chunks that were already lighted and discarded otherwise, although they are always saved to disk.
public static ProtoChunk deserialize(...) { ... boolean bl = compoundTag.getBoolean("isLightOn"); ... if (bl) { if (compoundTag2.contains("BlockLight", 7)) { lightingProvider.enqueueSectionData(LightType.BLOCK, ChunkSectionPos.from(pos, k), new ChunkNibbleArray(compoundTag2.getByteArray("BlockLight")), true); } if (bl2 && compoundTag2.contains("SkyLight", 7)) { lightingProvider.enqueueSectionData(LightType.SKY, ChunkSectionPos.from(pos, k), new ChunkNibbleArray(compoundTag2.getByteArray("SkyLight")), true); } } ... }
This basically erases any light propagations to chunks in pre_light stage when unloading them before the light stage and hence causes lighting glitches.
The Vanilla code currently uses this mechanism to erase cached data, which only removes the isLightOn field but not the lightmaps themselves.
As a concrete example I use the setup of MC-199952, which I suppose to be an instance of this:
- Create a new world with seed 1122583309043747515
- Set the render distance to 2
- /tp -616 77 200
- Reload the world
- Fly to -669 80 207 and observe the lighting glitch
Also note that the issue doesn't occur if omitting the reloading step, as expected.
- relates to
-
MC-170010 Sky-lightmaps not properly initialized
- Resolved
-
MC-170012 Lightmaps are missing for initial skylight
- Resolved
-
MC-196542 Small cleanup for skylight propagation code
- Resolved
-
MC-196614 Queued lightmaps are ignored for skylight propagation and initialization
- Resolved
-
MC-196725 Lightmaps get lost upon unloading chunks
- Resolved
-
MC-199952 Skylight does not propagate across certain chunk borders upon world generation
- Resolved