-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add ability to customize fabric directories #671
Conversation
Adds the ability to customize the "mods" and "config" directories via the "fabric.dir.mods" and "fabric.dir.config" Java properties. This can allow for different launcher profiles to have different mod directories so users don't need to install third party launchers to fix conflicting mods or config directories while keeping all of their settings, screenshots, and other preferences the same. In the future, it might be a good idea to add a way to customize this in the fabric installer.
Is there a debug log or just a normal level log that can output what directory FLoader will use? It might be a good idea in case of bug reports and debugging in the future due to this change. |
No, but that seems like it might be a good idea. |
I think there are 2 things to look at here, moving the mods dir, and moving the config dir. modsI'm in two minds about this, the main reason we never had versioned mod folders was to try and prevent people from loading the wrong save. (Id need to go and find the issue about it to be sure) This will suffer from the same issue. However as you noted #470 basically does the same thing, this was more designed for launchers to have a central repo of mods for each modpack. But can easily serve the same as what this PR is trying to do. Personally I dont think its really needed. configsMoving the config dir isn't something I have seen much request for and im not too sure how effective it would be. As mods may use the gamedir/rundir and/or not even store their data in the config dir. Personally I dont think there is a lot of benefit in having this? Most if not all launchers (including the offical one!) support creating seprate instances in a much more user friendly way than what this PR provides. I think if a user does want to share the screenshots folder (as mentioned in this PR, but not solved) for example, using the operating systems featues to create a symlink would be a better solution. Even vanilla Minecraft does not support loading newer config/options files in older versions of the game, its not something I would expect mods to support, in a worse case creating hard to debug issues. I still think having a clean split between each profile is good. |
Note that there is nothing preventing a mod obtaining the game directory and putting its data under any arbitrary path, and the game directory is easily obtainable when there is a Minecraft client/server instance. This doesn't solve the problem you describe, but may introduce many more subtle problems. |
A popular assumption on the safety of config-sharing is that the loader and the mods will not alter the config or the mods directories. While such behavior is true for reading command-line flags, including loading mods from command-line, log4j's loading of config, unfortunately, fabric (and even vanilla, remember how auto-jump is enabled when you launch 1.8.9 once?) does not operate under this model. If you wish safety for directory customization to facilitate sharing, I recommend implementing it in a way so we disallow modifying the shared directory, such as copying the given directory over on launch. |
I don't really mind making the directories configurable this way for special purposes, the way it is configured already targets advanced users. Disabling the mods directory should be possible too, maybe if the system property is an empty string? Config dir is not optional. |
I'm bumping this. While I fully agree with modmuss that separate game profiles/directories should be preferred over this, there are some edge cases where changing the mods directory is useful. |
This should already be possible using the The installer would download the normal mod jar to a location outside of /mods and then pass that to loader via the launcher profile it created. |
Adds the ability to customize the
mods
andconfig
directories via thefabric.dir.mods
andfabric.dir.config
Java properties. This can allow for different launcher profiles to have different mod directories so users don't need to install third party launchers to fix conflicting mods or config directories while keeping all of their settings, screenshots, and other preferences the same.This is very similar to the functionality landed in #470 and the proposed changes in #512 so this might be unnecessary, but addresses the issue of potential breaking changes in configs between mod versions.