The bug
In some situations the sky darkens when it shouldn't.
Affected situations
Likely incomplete
Sitting in a minecart or boat
Swimming in water
Standing on soul sand and snow layers 8
Code analysis and possible fix
The bug was introduced in 1.8 (according to the bug report comments) where they changed the client to track entities by their feet location instead of their eye location. This bug fix does the sky light calculation (for determining fog color) at the entity's eye location where it should be instead of their feet.
float f3 = this.mc.world.getLightBrightness(new BlockPos(this.mc.getRenderViewEntity()));
Linked issues
is duplicated by 29
relates to 2
Attachments
Comments 26
When in a Minecart, the sky only darkens on a flat track. It's normal on an incline. (And it alternates between and light when on a track that alternates between flat and inclined tracks.)
I think that this is due to the light levels being calculated from the feet instead of from your head (combined with the bug where you sit too low in Minecarts).
And light levels are being calculated from your feet instead of your head because of a bug fix in an early 1.8 snapshot.
Before the fix, the client referenced entities by eye position rather than feet position (the real coordinates). Now it uses the feet position, like the server does.
The sky darkening is dependent on the light level at the player's position. Since it now reads the position from the feet, it reads the light level at the feet, even when the player's eyes have a different light level.
What would fix this is to make the sky darkening read the light level from the eyes, separate from the other client functions that use player position.
Related to MC-31681.
Confirmed for 1.12.2 and 17w43b. I found the root cause and sent a PR fix to the Forge project.
Seems to me that it's partially fixed in 18w22c: Sitting in a Minecart and bobbing up and down in water doesn't make the sky turn dark anymore. Standing on soul sand and snow layer 8 does turn the sky dark, still.
Reopening this, because the part "Held Items darken in Minecart" of MC-47591 is fixed.