ModernFix

ModernFix

72M Downloads

[1.16.5] modernfix.properties keeps getting reset to default

Kaleidio opened this issue ยท 4 comments

commented

Bug Description

No matter what I try to configure the mod with, the mixin properties file just keeps getting reset. This makes it impossible for me to patch the mod indirectly.

Reproduction Steps

Install mod into Kaleidio's Battle Pack
Try removing the # out of one of the lines in the mixin config.
Change the value to something not default.
Reload the game
Reopen the config to find the file has been reset.

Log File

latest.log

commented

The file only resets if you specify the default value for an option (e.g. mixin.perf.dynamic_resources=false will disappear after the game is reloaded, while mixin.perf.dynamic_resources=true will stay).

commented

Sadly not the case. I absolutely removed the # AND changed the boolean on it. For example, mixin.perf.cache_strongholds, from true to false.

Next time i reloaded, the file had reset, and a crash log showed that mixin was still enabled and definitely loaded.

commented

It will not handle a trailing # on the same line. For instance,

mixin.perf.cache_strongholds=false # (default)

will be ignored, and produce the following warning on the next startup:

[17:20:46] [main/WARN] [ModernFixConfig/]: Invalid value 'false # (default)' encountered for configuration key 'mixin.perf.cache_strongholds', ignoring

This is why the instructions in the file suggest adding the option at the bottom manually, rather than uncommenting the existing lines.

In hindsight, this can probably be improved, but that will only happen for 1.20 & newer, as I don't support the 1.16.5 version anymore.

commented

Ah yep, that would be it. I guess this is due to using a very custom configuration format, wherein a language like toml would have absolutely tolerated a trailing inline comment.

Thank you for the info, i will make sure of that in the future. I will reopen if something bad happens.