Mrbt0907 / Weather2-Remastered

The decent update of the Weather2 mod by Corosus
33 stars 7 forks source link

1.12.2 - Changing a single value refreshes entire config resulting in stuttering and configex command not working as intended #196

Closed ProfessorFartsalot closed 1 month ago

ProfessorFartsalot commented 1 month ago

Describe the bug When changing any single config value (such as thunderstorm chance) the entire config gets changed. This is due to instance.updateField(field, true); on line 161 of the ConfigManager. This results in the game freezing for a quarter second on larger mod packs as well as the configEX command not being able to update configs serverside because a fullSync of the config loads the value from disk. (field.getRealValue() executes field.get(config))

The fix is to just not do fullSync when updating a single field. This not only fixes the configEX command, but also the game freezing for a very small amount of time when saving config changes.