Compatibility
Minecraft: Java Edition
Platforms
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
BB Preload World
This mod can be used in single-player or multi-player to load chunks for the use of Distant Horizons
In multi-player, DH can only cache chunks the player has visited, this mod puts the player into spectator mode and files them around the map so the client can cache these chunks.
As an added bonus, client-side mini-map mods will also get loaded in when doing this.
How to use
The mod must be installed on the client and server.
If playing in single-player, it is recommended to set "Enable distant generation" to false in DH settings while running the routine.
You can also set the "CPU Load" in DH settings to one of the higher profiles (remember to set it back to a lower one after!).
To load the surrounding area, players can use the command /bb_preload_world_start
To cancel the process before it has completed on its own, use /bb_preload_world_stop
(Running the stop command before the routine finishes may lead to corrupt chunk caches)
At a radius of 30 chunks, it can take 30+ minutes to complete, at 60 chunks it could take multiple hours.
Settings
Settings are managed via game-rules.
/gamerule bb_preload_radius 30
sets the radius (in chunks) that will be loaded around the player.
/gamerule bb_preload_world_start_requires_opp true
will make /bb_preload_world_start
require OP to use.
/gamerule bb_preload_world_stop_requires_opp true
will make /bb_preload_world_stop
require OP to use.
How it works
When starting a preload routine, the server-side part of the mod keeps track of which chunk the player has got to.
The client sends packets to the server saying when a chunk has been cached at LOD levels 0 - 6, when the server has received this packet it will move the player on to the next chunk.
The client also tells the server if "Queued chunk updates" is too high, or when there are any "Update propagator tasks" in the queue or being processed. If either of these are true, the routine is paused to allow chunks to finish processing before continuing.
This is because in my testing if the client moves away from a chunk that has started processing but not finished, it can leave that chunk cache in a corrupt state.
Contact
For questions Discord is preferred, for issues GitLab is preferred.