Swimming in water, riding a minecart or standing on soul sand and snow layers 8 darkens the sky at day time
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 by30
relates to5
Created Issue:
when sitting in a minecart, the sky darkens even if its day time
Put the summary of the bug you're having here
What I expected to happen was...:
the sky would stay the sameWhat actually happened was...:
the sky darkened after entering a minecartSteps to Reproduce:
1. place a minecart
2. sit in minecartEnvironment
Put your operating system (Windows 7, Windows XP, OSX) and Java version if you know it here
duplicates
is duplicated by
when sittinginaminecart, the sky darkens even if itsday timeRiding a Minecart or standing on Soul sand darkens the sky at day time
Riding a Minecart or standing on Soul sand darkens the sky at day timeSwimming in the water, riding a Minecart or standing on Soul sand darkens the sky at day time
relates to
is duplicated by
duplicates
relates to
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Confirmed for 36d
is duplicated by
is duplicated by
Put your operating system (Windows 7, Windows XP, OSX) and Java version if you know it here
is duplicated by
is duplicated by
is duplicated by
is duplicated by
Swimming in the water, riding a Minecart or standing on Soul sand darkens the sky at day timeSky darkens already when player is below y = 1 (standing on non full blocks, sitting in minecarts / boats, etc.)
Sky darkens already when player is below y = 1 (standing on non full blocks, sitting in minecarts / boats, etc.)Swimming in the water, riding a Minecart or standing on Soul sand darkens the sky at day time
Swimming inthewater, riding aMinecart or standing onSoul sand darkens the sky at day timeSwimming in water, riding a minecart or standing on soul sand darkens the sky at day time
Put the summary of the bug you're having hereWhat I expected to happen was...:
the sky would stay the sameWhat actually happened was...:
the sky darkened after entering a minecartSteps to Reproduce:
1. place a minecart
2. sit in minecartThe bug
In some situations the sky darkens when it shouldn't.
Affected situations
Likely incomplete
- Sitting in a minecart
- Swimming in water
- Standing on soul sand
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.
relates to
The bug
In some situations the sky darkens when it shouldn't.
Affected situations
Likely incomplete
- Sitting in a minecart
- 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.
Swimming in water, riding a minecart or standing on soul sand and snow layers 8 darkens the sky at day time
is duplicated by
The bug
In some situations the sky darkens when it shouldn't.
Affected situations
Likely incomplete
- Sitting in a minecart
- 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()));
is duplicated by
is duplicated by
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()));
relates to
That's MC-51150 (related to this issue).
Duplicate of MC-51150. Please search before creating new issues.
Dupe of MC-51150
The sky going black thing was actually fixed a while back (MC-51150); my motivation for creating this issue was MC-46667 being fixed for all blocks other than soul sand. It is still an issue from my testing.
The redstone and rails thing (MC-139497) is presumably its own issue since it's new (as far as I can tell), although it might actually be related to them attempting to fix this by changing whether a face is solid or something (I'd have to investigate further).
(That said, it could very much be WAI, as MC-46667 was marked as WAI (albeit by another mod and not a dev); I'm hoping to get a dev confirmation with regards to that on this issue)


Reopening this, because the part "Held Items darken in Minecart" of
MC-47591is 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?@ a: 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.
@ a: 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-84359confirms 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 Fabian Röling this was fixed in pre1.