mojira.dev
MC-193144

Skylight updates occur from y=-1 to y=-2048, light occurs below y0

Why this is an issue: This causes unnecessary lag to the light thread, particularly when doing stuff in void worlds.

From y=-1 to y=-2048 light level for skylight, as shown in debug menu is considered, but for below -2048, it always shows as level 15.

Block light is also considered, but this does not bear a large impact in relation, as skylight has to propagate all the way down.

How to reproduce the lag: get a void world. Fill in something like /fill -90 1 90 90 1 -90 stone . note lag occurs. Then, do /fill -90 0 90 90 0 -90 stone , then fill /fill -90 1 90 90 1 -90 air and then /fill -90 1 90 90 1 -90 stone . Note lag does not occur

Attachments

Comments 3

This causes unnecessary lag to the light thread, particularly when doing stuff in void worlds.

Do you have any proof that this is the case? Because in reality, no player will ever fall that deep without dying.

This is invalid. Light updates are only calculated until y=-16. Blocks below that simply inherit the sky-light values from y=-16.
The reason that the behavior changes below y=-2048 is that the queried BlockPos is converted to a long internally, decreasing the range of valid values. Hence, below y=-2048 the queried value wraps around and internally queries some large y, which is correctly returned as 15.

The lag you are experiencing in that case is likely MC-123584.

Jonas Cat

(Unassigned)

Unconfirmed

(Unassigned)

1.16.1, 20w27a

Retrieved