Posted April 27, 20214 yr Hey, I'm experiencing some issues with configs recently, here is my problem: Whenever you try to edit the config, there's a chance that it resets the whole config to default values, even if the values you've modified are valid. Error Message: [Thread-1/WARN] [ne.mi.fm.co.ConfigFileTypeHandler/CONFIG]: Configuration file run\.\saves\New World (4)\serverconfig\ava-server.toml is not correct. Correcting then it creates a backup file (.toml.bak) I've no idea where went wrong as ForgeConfigSpec is final which I can not debug through custom corrections (ForgeConfigSpec#correct, ConfigFileTypeHandler.ConfigWatcher#run) by creating my own config spec. Code: ServerConfig Config Registering What is happening? Edited April 27, 20214 yr by poopoodice
April 27, 20214 yr I'll try to help, but the only type of Config I've written is a Common type, if this is something specific to Server type. Is this only happening after editing certain config options or any of them? Nothing appears wrong with the numerical range configs Edited April 27, 20214 yr by urbanxx001
April 27, 20214 yr Author It happens randomly, sometimes when the changes are applied to any int, bool, double, string value the whole config gets reset, and unfortunately it does not provide any error message that tells where the error occurs. I can say the numeric values are always in range, and there are no typos for bool values because if for example I insert 20 into a field that accepts range 0 ~ 10, only the field will gets reset, not all the config file. If I types flse instead of false, it will throw an exception, and won't reset the whole config file neither. Edited April 27, 20214 yr by poopoodice
April 28, 20214 yr Author After tonnes of testings it seems like you CAN'T edit the config file through notepad++, try windows notepad or some other text editor as this works on my side. Hopefully this works for people who has the same problem!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.