Rain refill loading chunks
someaddons opened this issue ยท 6 comments
Rain refill appears to be loading chunks, making it cause more lags than necessary
https://gist.github.com/someaddons/f5329ff9c87fa8071c8df31d84bdaa9d
ye happened to see it while debugging some other chunkloading :D
I guess its loading some chunks because the chunkmanager list has like these unfinished-half loaded chunks aswell
Hey this is a nice feature tbh, maybe there is some way to keep it but optimise it? Some kind of Server-side cache that, I stead of loading the chunks to fill it, just keeps a record/count of unloaded chunks that "have had rain" - then when the chunk is loaded by a player, only then block updates occur?
Or some kind of background worker thread that just makes the rain filling a non-blocking operation? Use the spare ticks left over in a tick and spread it out. It's not super important than rain refilling bodies is 100% realtime is it :)
Still, if water body updates to into a non-blocking task queue as described, you'll need to handle overflows. In that case, pause the whole server and do a full flush of the queue IMO.
...too complicated? I will try and learn your code base and implement it :D
I wanted to put this into a new release together with 1.17 support and loom/ForgeGradle updates but sadly ForgeGradle 5 is currently not working properly. I will probably do a release only containing this fix in a few days.