Per-world view and simulation distance, adjusted automatically from MSPT and chunk load.
Folia works
Tested against a real Folia server for the first time, and two features were freezing it outright.
world.isChunkGenerated() blocks inside CraftWorld on a future. On Folia that parks the global region thread on a result only that same thread could have produced, so the server stops ticking: the watchdog reported the global region gone after five seconds and it never came back. Idle pre-generation ran into it on its own the moment the last player logged off, because start-when-empty is on by default. Predictive pre-loading called the same method for any fast-moving player.
Both now ask through getChunkAtAsync(x, z, false), which answers the same question — the chunk if it exists, nothing if it would have to be generated — without holding up a thread and without generating anything. Chunk work is routed to the region that owns the chunk. On Paper every one of these paths runs inline exactly as before.
Player state is read from the thread that owns it. Density scaling and complexity weighting read every player's position from the check cycle, and a world's players can sit in as many regions as there are players, so there was no thread from which those loops could be correct. They now work from positions each region reports for its own players. The per-player distance sweep decided its value on one thread and applied it on another; the whole evaluation moved.
Pre-generation progress is honest again
Probing ahead is bounded now. A run no longer reports 100% while thousands of chunks are still queued behind it, and the saved position follows the work that is finished rather than how far ahead the search has looked — a restart at that point used to drop everything still in the queue.
Measured on Folia 1.21.11
Distances regulate, pre-generation runs and resumes, MSPT reads real values, and no watchdog incident occurs with every subsystem switched on.