mojira.dev
MC-51150

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.

Source

Forge code changes

float f3 = this.mc.world.getLightBrightness(new BlockPos(this.mc.getRenderViewEntity()));

Related issues

MC-48871 When I go on soul sand, 1) the sky turns dark. 2) my hand also turns dark MC-49130 Sky and held Items become darker when sitting in a minecart. MC-49457 Sky darkens when standing on Soul Sand or in water MC-50960 When In a Minecart The Sky light diminishes. MC-54111 MInecart & Sky texture bug MC-55842 sky MC-56505 Sky seems to turn darker REALLY FAST while getting deeper in the water. MC-64048 Ilumination glitch when walking over soul sand MC-65712 Sky turns black while sitting in a minecart MC-65858 Dark sky on minecarts MC-66488 Sky turns black when you are in a minecart MC-67260 Sky goes black when in minecart MC-69674 Standing on soulsand will darken the sky MC-70254 Sky darkens when standing on Soul Sand MC-70717 distant sky dims when shade overhead or in water MC-70965 Sky darkens when in a minecart or boat. MC-72635 When flying close to water, the sky turns dark MC-77992 Flat land has black on the sky MC-78168 Boat 3rd person perspective MC-80675 Riding in Minecart Causes Lighting Issue MC-83463 Soul Sand Alters Sky MC-84359 The sky gets dark when riding a minecart MC-89472 Minecart fog flashes in moving minecarts MC-102491 Summoning a MinecartRideable causes a change in the sky light MC-105923 (Player) when is in minecart a sky changed color to grey! MC-106549 Sky goes dark in minecart MC-125320 Black fog / dimmed screen on water surface MC-132193 When riding up or down in a minecart, the sky at the horizon will start flashing MC-133951 Sky darkens whilst in a boat

Attachments

Comments

migrated
[media][media]
kumasasa

Reopening this, because the part "Held Items darken in Minecart" of MC-47591 is fixed.

Nathan Fox

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.)

Sonicwave

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).

BoxFigs

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.

Sonicwave

Related to MC-31681.

Sonicwave

Confirmed for 1.8.1-pre4.

Sonicwave

Confirmed for 1.8.1.

yut951121

Does this affects also on chunk distance > 16?

Ethan "derdiggermunster" Gardener

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.

T Sawick

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.

Platypus

Confirmed for 1.8.6

a

Shouldn't this just be merged with MC-31681?

BoxFigs

@ @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.

a

Yes I know. But I think it's the same underlying issue.

BoxFigs

@ @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.

Sonicwave

MC-84359 confirms for 15w31c.

Sonicwave

Confirmed for 1.9.

Caty Lawren

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.

Sonicwave

Confirmed for 1.10.2.

M

Confirmed for 16w33a

marcono1234

Sorry, thought this was describing a different issue. Changed the summary back but can confirm this as well.

bemoty

Can confirm for MC 1.12.1.

BillyGalbreath

Confirmed for 1.12.2 and 17w43b. I found the root cause and sent a PR fix to the Forge project.

Elemend

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.

 

Elemend

I can't recreate the Bug in 1.13.1-pre2 at all. All 4 Situations don't darken the sky at all.

pokechu22

According to @unknown this was fixed in pre1.

Brian Tyler

(Unassigned)

Confirmed

Minecraft 14w11b, Minecraft 14w34d, Minecraft 1.8, Minecraft 1.8.1-pre4, Minecraft 1.8.1, ..., Minecraft 18w06a, Minecraft 18w07a, Minecraft 1.13-pre1, Minecraft 1.13, Minecraft 18w30b

Minecraft 1.13.1-pre1

Retrieved