Add core.get_mapgen_chunksize() - #16289
Conversation
What exactly could such use-cases be? As of how it's currently implemented and documented, it would still be a constant value. |
|
It's not about being a constant, it's about parsing |
|
Looks good. Why would we ever have a chunksize that is not uniform in all dimensions? |
|
You can see some relevant discussion starting here: https://irc.luanti.org/luanti/2025-06-27#i_6268727 Note that even ignoring this I think it's good practice to expose stuff that exists in engine anyway via getters instead of having mods parse mapgen settings by hand. Consider also any fallbacks, limits or other stuff the engine might apply. |
Mods often manually parse the
chunksizesetting. If we want to ever change how this works (soon 😉) breakage will instantly occur.With this API function it's both easier and future-compatible for mods.
To do
This PR is Ready for Review.
How to test
//lua =core.get_mapgen_chunksize()