FastQuit
About the Modification
This mod allows you to instantly return to the Minecraft main screen while your game world continues saving in the background. No more long waiting for the saving process to complete!
Don't worry about data safety - the mod automatically waits for the world to fully save in critical situations, so no information will be lost.
Your world immediately appears in the list of available worlds, and you can perform various operations with it: edit, delete, or recreate, even if saving hasn't finished yet. This is made possible by using information from the still-saving world.
Configuration Settings
To configure the mod, use the configuration menu through ModMenu or edit the .minecraft/config/fastquit-config.txt file.
Available configuration parameters:
Show Notifications: Determines whether pop-up messages will be displayed when world saving completes.
Background Thread Priority: Sets the priority of the server thread when saving worlds in the background. This improves client performance during saving but increases the overall process time. The value must be between 0 and 10, where 0 disables thread priority changes.
Display "Saving World" Screen: When playing at high render distance, exiting the world can take time due to the need to clear client-side chunk storage. Enabling this option activates the saving screen display.
Show Saving Time: Determines whether the time taken to save the world will be displayed in notifications and the world list. Value 0 - never show, 1 - only in notifications, 2 - also in the world list.
Working Principle
The main concept of the mod is quite simple:
In standard situations when exiting a single-player world, the client waits for the server thread to completely finish saving before transitioning to the main screen. FastQuit skips this waiting period, allowing the server to continue saving in the background.
IMPORTANT: This doesn't always make exiting instantaneous, as the client still needs time to unload rendered chunks. However, even in this case, you'll notice acceleration since client unloading and server saving now occur in parallel rather than sequentially.
In practice, implementation is more complex:
Working with multiple threads creates various problems. For example, when transitioning to the world list, Minecraft tries to read level data but fails due to world file locking by background saving.
Instead, we obtain information through the still-saving server. Similarly, when attempting to edit, delete, or recreate the world, we use the existing session.
To ensure thread safety, complex synchronization is applied, preventing conflicts between the saving server and the client.
For some operations, such as reconnecting to a saving world or creating backups, we wait for the server to completely finish saving. We also wait for worlds to finish saving when completely exiting the game to guarantee data preservation.
Compatibility
Thanks to the use of MixinExtras and a custom Mixin configuration plugin, the changes were designed to be as unobtrusive as possible while remaining effective.
Known compatibility issues:
Fast Backups:
- (FIXED in FastQuit v3.1.0+) crash when exiting world with "Allow multiple running Worlds" option enabled
- (FIXED in Fast Backups v0.17+) crash when immediately exiting Minecraft after world exit
Wakes:
- (FIXED in Wakes v0.4.0+) crash when exiting world with Wakes 0.3.0
If you suspect incompatibility with another mod, please report it!