mojira.dev
MC-181926

Unknown options get overwritten

The Bug

When switching between versions, the newer version always overwrites unknown options in the options.txt. This could be fixed by ignoring unknown keys and keeping them as they were before.

How to Reproduce

  1. Open the game in 1.15.2 (or newer)

  2. Enable toggle Sneak

  3. Open the game in 1.14 and open the settings without changing anything

  4. Launch 1.15 again
    → ❌ The option resets to the default value

Linked issues

Comments 2

Does not seem like a valid issue, the only possible use case is future versions adding settings, this seems inapplicable though, only a small occurrence,  besides it would be too much work to fix such an issue as they would need to rewrite how they load and save the Options, IIRC they get put into objects then taken back from them and put together and completely overwrite the file. 

This is also problematic for mods that want to add options, not just downgrading.
It shouldn't be too difficult, after all, they can just change the file saving to replace by line, rather than replace the whole file. Loading doesn't need to change for this.

NeunEinser

(Unassigned)

Confirmed

(Unassigned)

1.15.2, 20w18a, 1.19.3

Retrieved