-
-
Notifications
You must be signed in to change notification settings - Fork 136
[1.17] Light is not updated #40
Comments
Looks like #25 |
- Completely rewrite how lighting is loaded in for clients Attempts to fix #25 and #40 The old hook was vulnerable to mods doing unexpected things, especially serverside. The old method also relied on unreliable ordering of events inside packet handling. New method just hooks directly into the packet handling methods to avoid conflicting behavior with mods and to create more reliable hooks. - Completely rewrites internal scheduling of light tasks Old scheduling was very vulnerable to block updates completely overloading everything. The old scheduling was also incapable of indicating to the chunk system whether block updates or other light modifying tasks were pending for a chunk. The new scheduling now groups tasks by chunk (light update, needs lighting, edge checks) and simply drains tasks by chunks. In the event that there are a lot of block updates, they no longer pile up in a queue since they are just grouped onto their chunk, which will eliminate duplicate updates. And since it's a FIFO by chunk, the maximum latency for a light update to happen is simply the number of chunks queued. The new queue also tells the chunk system to not unload chunks until any lighting task is fully complete for that chunk and its 1 radius neighbours. This will eliminate problems where the light engine was never able to complete tasks before server shutdown. This also officially kills light suppression. Before you ask, no I'm not going to re-add lighting _bugs_ to my light engine. I want lighting to work, which means I need to fix it when it clearly doesn't work. - Mark the vanilla light engine fields in LevelLightEngine as null This will break any mod expecting them to be non-null. But since we replace the light engine, it's better this way since it forces an explicit break rather than a silent break.
- Completely rewrite how lighting is loaded in for clients Attempts to fix #25 and #40 The old hook was vulnerable to mods doing unexpected things, especially serverside. The old method also relied on unreliable ordering of events inside packet handling. New method just hooks directly into the packet handling methods to avoid conflicting behavior with mods and to create more reliable hooks. - Completely rewrites internal scheduling of light tasks Old scheduling was very vulnerable to block updates completely overloading everything. The old scheduling was also incapable of indicating to the chunk system whether block updates or other light modifying tasks were pending for a chunk. The new scheduling now groups tasks by chunk (light update, needs lighting, edge checks) and simply drains tasks by chunks. In the event that there are a lot of block updates, they no longer pile up in a queue since they are just grouped onto their chunk, which will eliminate duplicate updates. And since it's a FIFO by chunk, the maximum latency for a light update to happen is simply the number of chunks queued. The new queue also tells the chunk system to not unload chunks until any lighting task is fully complete for that chunk and its 1 radius neighbours. This will eliminate problems where the light engine was never able to complete tasks before server shutdown. This also officially kills light suppression. Before you ask, no I'm not going to re-add lighting _bugs_ to my light engine. I want lighting to work, which means I need to fix it when it clearly doesn't work. - Mark the vanilla light engine fields in LevelLightEngine as null This will break any mod expecting them to be non-null. But since we replace the light engine, it's better this way since it forces an explicit break rather than a silent break.
- Completely rewrite how lighting is loaded in for clients Attempts to fix #25 and #40 The old hook was vulnerable to mods doing unexpected things, especially serverside. The old method also relied on unreliable ordering of events inside packet handling. New method just hooks directly into the packet handling methods to avoid conflicting behavior with mods and to create more reliable hooks. - Completely rewrites internal scheduling of light tasks Old scheduling was very vulnerable to block updates completely overloading everything. The old scheduling was also incapable of indicating to the chunk system whether block updates or other light modifying tasks were pending for a chunk. The new scheduling now groups tasks by chunk (light update, needs lighting, edge checks) and simply drains tasks by chunks. In the event that there are a lot of block updates, they no longer pile up in a queue since they are just grouped onto their chunk, which will eliminate duplicate updates. And since it's a FIFO by chunk, the maximum latency for a light update to happen is simply the number of chunks queued. The new queue also tells the chunk system to not unload chunks until any lighting task is fully complete for that chunk and its 1 radius neighbours. This will eliminate problems where the light engine was never able to complete tasks before server shutdown. This also officially kills light suppression. Before you ask, no I'm not going to re-add lighting _bugs_ to my light engine. I want lighting to work, which means I need to fix it when it clearly doesn't work. - Mark the vanilla light engine fields in LevelLightEngine as null This will break any mod expecting them to be non-null. But since we replace the light engine, it's better this way since it forces an explicit break rather than a silent break.
1.0.0-RC1 has some fixes in the suspected area, can you re-test? |
I re-tested it now These are the results on a vanilla client with starlight for 21w11a from releases on the server: These are the results on a fabric client with the same version of starlight , as on the server: The results sadly are the same [ I forgot to mention that the mobs spawn there because of the lightning in the issue description] |
And when switching back to vanilla on the server, the chunks get relighted and look like they are supposed to, with proper light
[EDIT: Updated] |
This is certainly very odd. I produced it locally and will check it out. I'm very unsure about why this is happening on the dedicated server and not the integrated; all of my 1.17 testing has been on integrated and I never saw any of it but my first dedicated test showed it. |
This does not occur in 1.16.5. |
I see where the problem is. The block light recalculation is incorrect in 1.17, as it's not using an offset. |
Update to the new version on the release page to fix |
I already Compiled the latest commit myself and the light issues are fixed , thanks |
After migrating my minecraft 21w10a vanilla server to fabric with latest starlight from releases (happens when Compiled locally too) The light is getting corrupted , What i mean by that is all light sources only illuminate one block , this happens on a clean server too
Here are some screenshots:
Vanilla:
[NOTE:] Sometimes the light fixes itself is some entities are around it. [Screenshot 2] it fixed near the glow squids this time but it’s not always the case
Starlight :
[EDIT: Updated the screenshots to look like they are supposed to]
The text was updated successfully, but these errors were encountered: