PlotSquared icon indicating copy to clipboard operation
PlotSquared copied to clipboard

Is LightCleaner still necessary?

Open PaBox opened this issue 3 years ago • 19 comments

Server Implementation

Paper

Server Version

1.16.5

Describe the bug

When generating new chunks with a custom template that includes lighting-blocks, the lighting is not updated after the chunk is placed the first time. Instead LightCleaner was advertised in the past.

The problem is, that LightCleaner goes into an infinite loop of calculating light for unloaded chunks and this is costing a lot of performance. The author of that plugin said, that the problem relies elsewhere and it is not his fault, so I wonder where this problem comes from.

To Reproduce

  1. Use Template with lighting blocks, for example 'Bridge.template'
  2. Generate Chunks
  3. See no lighting

Expected behaviour

PlotSquared should handle the lighting itself.

Screenshots / Videos

No response

Error log (if applicable)

No response

Plot Debugpaste

https://athion.net/ISPaster/paste/view/ca36ed467388451b9ef4e047cf52e247

PlotSquared Version

PlotSquared version 6.3.0

Checklist

  • [X] I have included a Plot debugpaste.
  • [X] I am using the newest build from https://www.spigotmc.org/resources/77506/ and the issue still persists.

Anything else?

No response

PaBox avatar Feb 23 '22 03:02 PaBox

PlotSquared version 6.3.0

Try with a more recent build and see if the issue persists. Also, update FAWE.

PierreSchwang avatar Feb 23 '22 18:02 PierreSchwang

Cannot reproduce with PlotSquared 6.5.1 and FAWE 2.0.2

PierreSchwang avatar Feb 23 '22 18:02 PierreSchwang

As you can see, On 1.16.5 I am using the newest versions I can use, being 6.3.0 PlotSquared, as 6.4.0 requires JAVA 17. Same with FAWE. Both versions you named are not compatible to 1.16.5...

PaBox avatar Feb 23 '22 20:02 PaBox

Paper 1.16.5 is compatible with Java 17

If you are using a version prior to 1.17, add -DPaper.IgnoreJavaVersion=true to your JVM flags and your server skips the Java version check.

PierreSchwang avatar Feb 23 '22 20:02 PierreSchwang

I searched their comments on the patch and they dont state it being compatible, as this is a clear workaround and they cant GUARANTEE it to work. But I just saw that on the main page of your plugin it states to use 6.0.0 for 1.16.5...? Is that just old or am I missing something... Still thank you for that hint at that point, it is not documented at that point if I see it right...

PaBox avatar Feb 23 '22 20:02 PaBox

The version check is just some dumb stuff which minecraft introduced, who knows why - i've had no issue nor received any reported issues when running paper 1.16 on java 17

PierreSchwang avatar Feb 23 '22 20:02 PierreSchwang

I just tried this and used PS Version 6.5.1 with FAWE 2.0.2-103. This is still a bug.

PaBox avatar Feb 23 '22 21:02 PaBox

And I do not think that this is a FAWE issue, as the World Generator is the problem here or not... I am talking about road generation here...

PaBox avatar Feb 23 '22 21:02 PaBox

Still works perfectly fine grafik grafik

PierreSchwang avatar Feb 24 '22 20:02 PierreSchwang

Yes, the debug version of the command which places one corner also comes with block updates, which is quite annoying when working with floating blocks. But if you use the template and fly out a little bit further so chunks actually generate with the world generator, the light sources are still NOT updated.

What I have done is also enable the in-built options for Lighting of both FAWE and PlotSquared again, as LightCleaner could have interfered at that point. Should I create a new template? Another Debugpaste maybe with the current setup so one can compare? (Though I think you are using default settings)

I will provide you with a screenshot: 2022-02-23_22 38 38

PaBox avatar Feb 24 '22 23:02 PaBox

Is this repeatable? Otherwise I will create a clean server on 1.18 and see if it works and create another Issue (then close this). But this is a persistent problem in 1.16.5 if blocks are placed using the world generator (not the debug command) and if it is the only way around we might have to update to 1.18. But at the moment not even that is certain and I do not have much time for testing at the moment, so I might add something to this thread when a fix is already implemented. Watching the progress on Github though in the meantime.

PaBox avatar Feb 27 '22 17:02 PaBox

I see, I'm now able to replicate that

PierreSchwang avatar Feb 27 '22 17:02 PierreSchwang

Would you remove the label 'Cannot replicate' then? This is an issue which has persisted for quite some time now (look at any youtube video using the bridge template available on youtube ever!, even the spigot page photos have that problem since at least v4 :)

grafik

https://www.spigotmc.org/resources/plotsquared-v4-v6-out-now.1177/

The problem is that the world generator does no light updates itself and does not hook into the settings of plotsquared and neither into the lighting system of FAWE (which could trigger Light Cleaner properly) - but FAWE cant generate new chunks like a world generator as far as I am aware of it.

As this has bothered quite a lot of people over all this time (while many dont notice it I suspect), I wonder, why this has not been recognized before by the devs - I will take a look at the code, maybe I can find the whole world-generation specific part, see whats wrong and what could be done better.

Cheerio for now.

PaBox avatar Feb 27 '22 23:02 PaBox

I don't have the permissions to do that anymore - You'd have to wait until a code owner sees this.

PierreSchwang avatar Feb 28 '22 18:02 PierreSchwang

I don't have the permissions to do that anymore - You'd have to wait until a code owner sees this.

Should be resolved by now.

NotMyFault avatar Feb 28 '22 19:02 NotMyFault

I'm not quite sure if that's a FAWE issue or a PS issue yet - I'd have to look through the code for that

PierreSchwang avatar Feb 28 '22 19:02 PierreSchwang

There's no API in bukkit/spigot(/paper that I'm aware of) that allows for lighting to be "generated" with lighting blocks placed. You can also quite easily see many lighting issues during generation from Minecraft itself from lava lakes above ground, and sometimes underground.

dordsor21 avatar Mar 04 '22 01:03 dordsor21

Is this an answer or just and information? Minecraft fixed most of its lighting bugs with 1.14.4 and I havent been seeing those shadows for a long time actually. My lava lakes are fine... Why arent the schematics pasted in with fawe?

PaBox avatar Mar 04 '22 05:03 PaBox

This does work now somewhat, but I suspect it being updated in a wrong order and or claiming and clearing the plot doesnt trigger the light level recalculation. Its also most noticable where 2 schematics meet each other - so maybe update the neighboring chunks as well? I dont really know what could be the issue here: 2023-03-16_02 42 12 With Cleanlight I get the correct output: 2023-03-16_02 42 36 Its not really much of an issue right now, but maybe you can take a look at it if you got some time :) EDIT: Is it possible to include the light levels in the template somehow? I suspect not :(

PaBox avatar Mar 16 '23 01:03 PaBox