-
Notifications
You must be signed in to change notification settings - Fork 1
Description
In my .minecraft, a ExploitPreventer.json file has generated after installing the mod. Mod configs are supposed to go in .minecraft/config directory (like .minecraft/config/ExploitPreventer.json), or a subdirectory on that directory, such as .minecraft/config/ExploitPreventer/ExploitPreventer.json for organization purposes, and as a good practice, to not clutter the main directory. I also do use a Git repository inside my config folder in case a power loss or game/mod update corrupts a config, so I can revert stuff, which exploit preventer's config file is not included since the git repo is not in the root directory (as i don't want to save unrelated stuff to git) but rather in the config directory. The config file of this mod is rather small and I do not plan to disable or change any of the default settings, but as a good practice I track all my configs with git anyways.
Changing the config directory will cause old configs to not be read anymore so extra code to move the old config to new config location might be needed.
Alternatively, it could be made that if the old config exists, that is read and for new users or when deleting the config the config is generated on the correct dir, if moving the config from old location to the new location programmatically is deemed to not be trivial (should be an easy Files.move with atomic move flag, then continue to read on from new file location, but just putting an alternative in case that's not desired, Files.move with atomic move flag should never fail unless the target is on a different drive or a network drive, which would copy the file instead of atomically moving it. In this case .minecraft and .minecraft/config should be on the same drive, so this should realistically never fail unless one created a link of the config folder to a different drive)