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()));
Related issues
is duplicated by
relates to
Attachments
Comments


Reopening this, because the part "Held Items darken in Minecart" of MC-47591 is fixed.
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.8.1-pre4.

Confirmed for 1.8.1.
Does this affects also on chunk distance > 16?
Not sure what "chunk distance > 16" means here, but I have my draw distance at maximum and it affects me.
There's another bug involved in this which I've reported elsewhere: Distant sky should not be affected by light level at the player's position. Having it get dimmer the moment the player steps under a tree is creepy and weird. (It's one of the reasons I stopped playing Minecraft this year.) If anything, the sky should get brighter not dimmer when the player's immediate environment gets dimmer, but it's simpler to just have it unaffected; which would also fix this issue.
I second the analysis of the issue offered by BoxFigs and Sonicwave. This is especially evident when swimming, as the darkening of the horizon seems to occur only when one's feet are significantly below water. When swimming on the surface, the horizon lightens/darkens with each 'stroke'.
edit: i.e. the light levels seem to be calculated from the feet, not the head.
Confirmed for 1.8.6
Shouldn't this just be merged with MC-31681?
@ @unknown: This bug is when the player's feet are in the ground. That bug is when the sky light at the player's location is less than 15.
Yes I know. But I think it's the same underlying issue.
@ @unknown: I guess I could see how it could be the same bug (standing in a block gives a light level of 0). However, this one can be fixed without the other being fixed (have sky darkening read the light level at the eyes instead of the head). Fixing the other one will fix this one, though (removing sky darkening completely).
Of course, it's up to the mods to decide what they want to do.

MC-84359 confirms for 15w31c.

Confirmed for 1.9.
Only happens when the bottom of your hitbox is covered, not the top. You can test that by making a 1-deep hole in the ground and replacing a side of the hole with a fence, pushing a block over your head with a piston, and going into 3rd-person mode and looking around until you can see the sky. It's bright as ever.

Confirmed for 1.10.2.
Confirmed for 16w33a

Sorry, thought this was describing a different issue. Changed the summary back but can confirm this as well.
Can confirm for MC 1.12.1.
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.
I can't recreate the Bug in 1.13.1-pre2 at all. All 4 Situations don't darken the sky at all.

According to @unknown this was fixed in pre1.