ServerCore

ServerCore

384k Downloads

Chunk loading screen is broken if spawn chunks are disabled; chunks load much slower when in game

SplendidAlakey opened this issue ยท 2 comments

commented

Describe the bug

When spawn chunks are disabled in the config, the animation that plays during the world loading on clients gets stuck at 0% and a tiny amount of rendered chunks. This does not prevent the game from loading, however, once loaded in, the chunks load significantly slower than in vanilla or with spawn chunks enabled. The console also won't log any "Preparing spawn area" stages, but I assume that's intentional, since there isn't a spawn area.

I can see how slow loading of chunks could be expected due to the fact that the spawn area isn't being created, but from my understanding the game still preloads the chunks around you so that you can spawn, as such I don't really understand why it loads a much smaller area within roughly the same amount of time. At the very least the loading animation shouldn't break.

I don't see anything of value in the logs other than the missing loading progress lines, but just in case here's the full log: https://gist.github.com/Footage2-Amply-Pounce/e81f9ac231bf61023b9eebd4ec094dea

Reproduce

  1. Set disable_spawn_chunks to true in servercore.toml
  2. Create a new world and watch the animation, it will draw a few chunks and stop, permanently being stuck at 0%
    2022-08-11_14 32 18
  3. The world will load in, but the chunks around you will be loading extremely slowly
    2022-08-11_14 54 59

Expected behavior

  1. Loading animation should play, regardless of spawn chunks being loaded
    2022-08-11_14 44 38
  2. There should be a lot more chunks loaded around the player right away
    2022-08-11_14 44 57
  3. Subsequent chunk loading should be as quick as vanilla

Versions

ServerCore: 1.3.1
Minecraft: 1.19.2

Mod incompatibilities

Tested without any other mods installed, but on a side note, if you install Bedrockify mod and use a Bedrock loading screen, it will also be stuck at 0%.

commented

This does make sense, because disable_spawn_chunks currently stops it from loading at all.

The animated progress bar on the client essentially displays the spawn chunks being loaded (1).
Since it skips the loading part, it will place you ingame earlier, but none of the chunks will be loaded (2).
Because its still loading those chunks and warming up, chunk loading will be much slower for a little bit until that is complete (3).

I will be changing it so it still does the whole loading sequence, and the chunk system gets a chance to warm up, and then remove the spawn chunks when the server finished starting up.

Doing that should also improve compatibility with some other mods that want to hook into the same parts of the code, such as ksyxis and fastload. On that note, I wouldn't be very surprised if ksyxis gave you similar results as this current implementation.

commented

Alright, thank you for the swift response as usual :)

And I never tried ksyxis nor fastload because the dev of the latter outright said that the mod does unsafe things that shouldn't really be done: BumbleSoftware/Fastload#17 (comment), and the dev of the former warns that the mod is unstable on their CF page. So can't comment on that.