
The config is behaving strangely
Nitess opened this issue ยท 10 comments
Clean build
neoforge 21.1.95
sophisticatedcore-1.21.1-1.1.3.836
as an example sophisticatedbackpacks-1.21.1-3.22.5.1173
with sophisticatedstorage-1.21.1-1.2.6.1038 the result is the same
I wanted to disable a couple of things, and noticed that the config is too big with a huge number of repetitions. After conducting a small test with a clean build, I realized that when you click create a world, the config is updated with duplicate parameters. Also, when you exit* from the world, it is also updated duplicating the parameters. I got curious, and after a couple of clicks to create a world and cancel the config grew in notepad++ to "length: 114 106", and when searching for a random "sophisticatedbackpacks:stonecutter_upgrade|true" notepad found it 40 times.. It seems like if you set the first unnecessary upgrade to false, it stops working in the game..
- At some point it stopped growing, I didn't quite understand at what point, maybe after a restart, maybe it wanted to, but anyway it is initially created with repetitions.
I also had the same issue before the change, but now after it I am unable to recreate the issue. So I would be interested in how exactly I can get that done, just deleting the file and running the game / entering the world creates a correct file. If I delete the file after and enter another world it doesn't create a file at all most probably because it's already loaded in cache so it doesn't even try to check if there's something on the disk.
Oh why didn't I think of this..
I threw the debug log
My actions: click create world - cancel - create - cancel
By the end of the log, 2 repetitions
[net.neoforged.fml.config.ConfigWatcher/CONFIG]: Config file sophisticatedcore-common.toml changed, re-loading
In another test I created a world with only core and backpacks. There were duplicates in the config. After I added chests to the mods, I entered and exited the same world, this is what happened to the config and debug
https://gist.github.com/Nitess/0ee0eefac59d3af76b3c90066727abee
Actually I was able to recreate I just didn't realize that when I am still seeing single line that there are duplicates. Going to figure out what to do with this, the worst case I will remove it in favor of people using other tools for removal of recipes / from jei
Thanks for reporting this, never noticed that it's creating this kind of mess in there. In the latest release I just changed the way enabled list saves to config when it's not defined yet. Should prevent this issue as well as some errors in log that happened before.
Downloaded a new version, it seems the problem is still there.
On a clean build, when deleting the config and entering the world, it is updated with a length of 5806, also with repetitions. When closing the game, it is updated again to a length of 8354.
It seems that after changing some parameter and entering the game, it stopped updating. Is it possible to find somewhere a ready-to-edit sophisticatedcore-common for chests and backpacks?
Ok, released a new version that should fix this issue, please test it out and let me know if that works correctly now
I think it worked.
After the same manipulations I don't see any repetitions, and it doesn't seem to be overwritten anymore.