dexman545 / Fabric-Autoswitch

Automagical switching of tools to the best one for the job, for Minecraft
https://www.curseforge.com/minecraft/mc-mods/fabric-autoswitch
GNU Lesser General Public License v3.0
24 stars 6 forks source link

Mod cannot recover from an invalid config #56

Closed EntityinArray closed 1 year ago

EntityinArray commented 1 year ago

Steps to reproduce:

  1. Launch the game and join a world
  2. Open autoswitchAttackAction.cfg
  3. Add a line block@immersive_weathering:grass_growth_replaceable = any
  4. Notice how mod stops working, trying to erase this line also doesn't work anymore
  5. Run /autoswitch cacheSwitchResults true (we didn't change anything, just made the mod rewrite configs)
  6. Notice how it replaced our block@immersive_weathering:grass_growth_replaceable = any with block@immersive_weathering = grass_growth_replaceable = any
  7. The mod won't let go of block@immersive_weathering = grass_growth_replaceable = any until you fully exit the game, save the config and launch the game again

Potential solution: Your mod tries to "fix" an invalid config, which is a bad thing to do. It would be better if it ignored invalid configs and went with default settings instead.

dexman545 commented 1 year ago

Something could be done to potentially make this more graceful, but for now the issue is the :, replace it with !.

Thanks for the report.