mt-mods / moretrees

Other
8 stars 10 forks source link

Fix dead ongen saplings due to biome_lib secession #35

Closed debagos closed 5 months ago

debagos commented 5 months ago

I recently updated moretrees and noticed that the ongen_saplings that were already present prior to the update never grow anymore.

This is a big thing for me because over months I slowly let the whole map surface generate, without activating the newly generated areas. So there are dead ongen saplings everywhere on the map...

The dimension of this problem is very unique to my server because of the pre-generated map, but I expect dead saplings on other publicly hosted servers as well, due to how biome_lib works (see: biome_lib_queue_ratio). There are more reasons to why an ongen saplings hasn't grown yet than a pre-generated map (eg. NodeTimer not run yet due to high lag or a server shutdown/crash).

My solution to this issue is adding a unique group to those ongen saplings and let a LBM kick them active. Furthermore I added a setting to enable the mentioned LBM. The LBM isn't enabled per default, to not create unnecessary overhead for simple and small scale users of this mod, while providing a simple fix for people like me.

BuckarooBanzay commented 5 months ago

A few line-too-long errors here: https://github.com/mt-mods/moretrees/actions/runs/7485615804/job/20379754526?pr=35 not sure if they should be fixed or just the min-length increased, i'm fine with both :)

How rare is that use-case? Could it be something that could be done in a standalone mod perhaps (not suggesting this, just figuring out who else would have that problem too)

debagos commented 5 months ago

A few line-too-long errors

Oops, that's fixed now.

How rare is that use-case?

I think it's a pretty rare use case, but like I said I expect to see dead saplings not just on my own server. Let me give you an explaination on what can cause dead saplings:

To elaborate a little bit further, here are two reasons why a saplings node timer may never have ran:

That would work, yes. I personally prefer the in-mod fix, but I wouldn't mind rejecting this PR completely and rely on the admins themselves to notice and fix the issue. But that would leave people who aren't able to come up with a simple mod who fixes those broken saplings pretty much on their own.

Oh and I would like to mention that @Niklp09 gave me the idea of the LBM after he learned about me having this issue.