FastOpenLinksAndFolders
Tired of the game freezing for half a minute while the "Photos" app loads your recently taken screenshot? Or when the browser opens a link from chat or a book, and Minecraft freezes in anticipation? Perhaps you're annoyed that the game stops responding when you click the "Open resource packs folder" button?
Then this mod is made exactly for you!
FastOpenLinksAndFolders prevents game freezing in situations where something needs to be opened outside of Minecraft. This includes viewing screenshots from chat, following links in chat or books, as well as opening resource packs and data packs folders. The mod doesn't introduce other changes or optimizations - it solely solves the problem of game blocking during external operations. I encountered this annoying feature myself and decided to create a solution.
How does it work?
When Minecraft requests the system to open links or files, the game for some reason waits for the process of closing the error handler to complete, which blocks all current operations. Although some programs in certain systems might quickly close the error stream, this usually isn't the case. For example, the "Photos" app in Windows can take significant time, leaving the game frozen until ready. On my old computer, this sometimes took over a minute.
The game does this to enable error logging in case of external application loading failure - a logical solution but not ideal. Since Minecraft doesn't actually process these errors or opening results (except for logging), FastOpenLinksAndFolders makes the waiting operation asynchronous. This gives the best of both worlds: errors are still registered if application loading fails, but the game doesn't block during the process.
Updates
Given the simplicity of this mod, it's unlikely to require frequent updates. I'll try to mark working versions in the latest files after checking their functionality, but most likely the mod will just work. If problems arise, create an issue on Github if I haven't noticed the malfunctions yet. For example, the first version works from 1.16 to 1.18 simply because I haven't tested other versions. Let me know if the mod works on other versions!
For Forge?
This is a really simple mod, and I'm not sure how useful it will be for Forge, considering I don't use it. First, I need to make sure that Forge doesn't change anything in this area, but if there's some interest, I'll probably create a version for it.