mekanism / Mekanism

A mod for Minecraft
MIT License
1.37k stars 522 forks source link

keybindings reset #5403

Closed ToserBan closed 5 years ago

ToserBan commented 5 years ago

Please use the search functionality before reporting an issue. Also take a look at the closed issues!

Issue description:

When i change the keybindings and restart the game, the keybindings reset to their default values. This happens with and without the controlling mod installed. Tested on my modpack "Tosers Spacecraft". I can change other keybindings without problems. They remain after restart as expected. Only mekanism keybindings are affected.

Steps to reproduce:

  1. change some mekanism keybindings for example change armor mode to the "i" key 2.restart minecraft 3.options.txt changed the armor mode to the default key "g"

Version (make sure you are on the latest version before reporting):

Forge: 14.23.5.2824 Mekanism: 1.12.2-9.6.5.357 Other relevant version:

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

[gist/pastebin/etc link here]

pupnewfster commented 5 years ago

Probably has to do with the spaces in the name of the keybinding lookup key. This probably will be fixed by #5389

thiakil commented 5 years ago

@ToserBan are you using a non-english language for Minecraft?

ToserBan commented 5 years ago

I´m using german as language, but in older versions of mekanism i had never a problem to change the controls. Right now i´m testing out english(US). Ok, ready: The problem occurs as well in english(US). Furthermore i detected another strange behaviour according to keybindings, but that does not necessarily have to do with mekanism. When i tried to type in the "i" key for mekanism armor mode switch, it showed "alt+i", it did it as well for other mod controls. I had not caps lock or something activated and after playing around with shift, alt and control key i was able to type in the normal "i", but after a minecraft start i had the default value "g" for mekanism armor mode switch.

ToserBan commented 5 years ago

Update: I saved my options.txt, deleted the modpack and reinstalled it(technic launcher version). Then i copied back the options.txt and started the game. Now it works, i can change all keybindings including mekanism controls. Tested only in english(US) language. Maybe the above problem came from an inaccurate language translation. In the english version, i could use the default "g" key to change fly mode in the german version i couldnt, really strange.

thiakil commented 5 years ago

The code in the current release of mekanism stores the keybinds with a translated 'description', where it should be using the translation key so that language doesn't matter - this is legacy code that will be resolved in the PR pupnewfster linked.

This is probably your issue, but we can't say for sure until I finish up that PR

ToserBan commented 5 years ago

When i change back to german, i have the old problem. Anyway, thanks for your work on this great mod.

pupnewfster commented 5 years ago

9.7.5 should fix this issue (though you may have to view (or change) the keybindings and then restart MC once for it to properly sync if it starts in a broken state). If you could confirm that would be great