bergerhealer / Light-Cleaner

Regenerates light levels in chunks or entire worlds to clean up dark spots. Continuation of NoLagg Lighting.
MIT License
41 stars 6 forks source link

Issues with custom world generation 1.16.5(+?) #47

Open PaBox opened 3 years ago

PaBox commented 3 years ago

I am using P2 v6 and they suggest using LightCleaner with autoCleanEnabled, but in the wiki it states that "after 1.14.4 you shall not use this option" because auf regeneration loops. But now I do not know how to light up newly created chunks, as roads/plots with lighting are spawned using the world generator and not WorldEdit. /cleanlight works, but there is no true auto-function for something like plots at the moment, or am I overlooking a detail?

I am running the following plugins atm:

AuthMe-5.6.0-SNAPSHOT.jar BKCommonLib-1.17.1-v3-1117.jar ChestShop-3.12.jar DeadChest-4.7.0.jar Dynmap-3.2-beta-2-spigot.jar EssentialsX-2.19.0.jar EssentialsXChat-2.19.0.jar FastAsyncVoxelSniper-2.2.2.jar FastAsyncWorldEdit-Bukkit-1.17-283.jar HolographicDisplays-2.4.9.jar LightCleaner-1.17.1-v1-117.jar LuckPerms-Bukkit-5.3.61.jar LuckPermsGUI-4.1.jar mcMMO-compiled-2.1.201.jar mobcatcher_v1.0.2.jar Multiverse-Core-4.3.0.jar Multiverse-Inventories-4.2.2.jar Multiverse-NetherPortals-4.2.1.jar Multiverse-Portals-4.2.1.jar PlaceholderAPI-2.10.10.jar Plot2Dynmap-6.0.1.jar PlotSquared-Bukkit-6.1.2-SNAPSHOT.jar ProtocolLib-4.7.0.jar Rankup-compiled-3.12.2.jar RHLeafDecay_1.17_R1.jar SkinsRestorer-14.1.5.jar Vault-1.7.3.jar worldguard-bukkit-7.0.5-dist.jar

I would appreciate any help and suggestions on this topic, as i think to not be the only one with this problem. Greetings.

bergerkiller commented 3 years ago

I definitely do not recommend using it because like stated, what happens is that it will access a chunk ticket for chunks to work on, and the server then proceeds to asynchronously generate 2 chunks away from those chunks. Light cleaner does avoid working on chunks with neighbouring chunks that arent already generated, but not 2 away, and that broke stuff.

On some servers, and maybe now paper too, this generating of chunks 2 away was disabled and it's probably safe to use that feature. But because it's so hard for me to pinpoint what servers do and don't do this, I made a blanket statement to not use it beyond 1.14.

You can try and enable it, but keep a close eye on /timings that no disproportionate amount of time is spent loading/generating chunks, and check after an hour or so that the world folder size hasn't grown disproportionately. Similarly, you can check /cleanlight status regularly while the server is idle to verify it isn't perpetually generating chunks and working on them 'on its own'.

Another reason is that, beyond 1.14, most vanilla lighting bugs when generating new chunks should be gone. I don't know about custom world generators, those might still be glitched.

PaBox commented 3 years ago

Thank you for those informations, I am waiting for my coworker to add more ram to our current setup, as I cannot test the auto function, for it starting 4000+ chunk-relightings in the beginning and my server not being strong enough, to cope in reasonable time with that problem. But it is only a matter of time, until my ram grows from 4gb (current) to 32gb - I am also interested about the issue itself, you might have seen plotsquared in the plugin list: My current setup regenerates a world with custom schematics (including lights), which may or may not be generated by using (fastasync-)worldedit. Biggest problem: those lights only render lighting where they are placed, resulting in single lit blocks surrounded by darkness. Weirdly enough, the pictures of plotsquared featuring their plugin (they have a bridge template with a lot of lights) show generated structures with this exact problem, so I am definitly not the only one. I also noticed //undo and //redo do not trigger cleanlight and some other commands not triggering the autoCleanWorldEditEnabled, which is set to true. So I am not sure, if this is a problem with the worledit-hook or the worldgeneration(as I do not know which one PlotSquared is using), but I will try the new setup and report again.

From what you said, I hear the possibility of using autoClean on 1.16.5 without crashing the server and as PlotSquared still recommends this option (but probably more because it is dated) I will give it another try. Thanks for helping!

bergerkiller commented 3 years ago

The worldedit hook is a bit weird, because there are two. One is specifically for FAWE and the other uses the 'normal' worldedit hook. It's a bit limiting in what kind of events I can get from it, and in the case of FAWE it is a bit rife with bugs as well unfortunately. Just a side-effect of the asynchronous thing I guess.

Was the undo issue with FAWE or WorldEdit?

PaBox commented 3 years ago

I am using FAWE (as you can see in my original post), because I thought its current state was as supported as normal WorldEdit. The problem is, that normal WorldEdit ist unreasonably slow and if there is no way around it, it may lead to a direct cost increase of the server (would you use standard worldedit on your prodcution server?). When doing undo/redo actually nothing is triggered but I wonder why, because with //set it works as expected. At the moment there is no other advanced block-managment plugin except PlotSquared in place, so I think it is only one of the hooks which is not called here (maybe the event is only slightly different in that case). As FAWE is still in beta, I have to use standard WorldEdit as soon as the server is launched, if this problem persists. I think the lighting bugs are the only thing keeping me now from using FAWE (which is a shame, as the manual command is perfect but the detection is not - but as you said, probably a problem with FAWE as well).