Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultOptions resets my keybinds on every launch #86

Open
1 task done
saffaffi opened this issue Sep 11, 2024 · 9 comments
Open
1 task done

DefaultOptions resets my keybinds on every launch #86

saffaffi opened this issue Sep 11, 2024 · 9 comments
Labels
bug Something isn't working as expected Minecraft 1.21 Issues occurring in Minecraft 1.21.x needs repro This issue needs a reproduction case before it can be solved NeoForge Issues occurring on the NeoForge platform

Comments

@saffaffi
Copy link

Security Notice

  • Users might post VIRUS LINKS in comment responses to issue reports. DO NOT DOWNLOAD ANY FILES FROM HERE.

Minecraft Version

1.21.1

Mod Loader

NeoForge

Mod Loader Version

21.1.41

Mod Version

21.1.1

Balm Version

21.0.19

Describe the Issue

Every time I launch my Technical Electrical: Secret Schemes 5.0.0.29.1 Beta instance (a modpack that includes DefaultOptions), my keybinds reset to their defaults. I have to customise the same ones every time I launch, because they're back to the way they were before.

I tried removing files from the .minecraft/config/defaultoptions/ folder in the hope that that would stop DefaultOptions from doing this, but that didn't work - I had to actually disable (remove) the mod from the modpack, and that then fixed the problem.

The logs I've attached are from a run of the modpack where there were no files in .minecraft/config/defaultoptions/, but the keybinds were reset regardless. The reset happens on launch, before I've joined a server or a world.

Logs

latest.log

Do you use any performance-enhancing mods (e.g. OptiFine) or custom server distributions (e.g. SpongeForge)?

No OptiFine or custom server

@saffaffi saffaffi added the bug Something isn't working as expected label Sep 11, 2024
@BlayTheNinth BlayTheNinth added Minecraft 1.21 Issues occurring in Minecraft 1.21.x NeoForge Issues occurring on the NeoForge platform labels Sep 12, 2024
@BlayTheNinth BlayTheNinth moved this to 🌟 Next Items in Issues Sep 12, 2024
@BlayTheNinth
Copy link
Member

There is only one case where Default Options changes the value of a key mapping, and it's if there's both a default key defined, and the key in question is not an already known key.

The logs show Found 0 default keys and 239 known keys, so neither condition is met and Default Options is not changing the key mapping through any regular means. I can also not reproduce this when using only Default Options by itself, nor with a small pack containing Default Options and another mod adding keybindings.

That means this is most likely an edge case caused by one of the other mods in that pack and it would first need a reliable reproduction case in order to be fixed.

@BlayTheNinth BlayTheNinth added the needs repro This issue needs a reproduction case before it can be solved label Sep 16, 2024
@BlayTheNinth BlayTheNinth moved this from 🌟 Next Items to 📧 On Hold in Issues Sep 16, 2024
@RickieGamer
Copy link

was experiencing the same bug, compared my modlist to the previous one, made a profile using only those mods
latest.log
It only seems to reset mod's keybinds

@StoneLegion
Copy link

Also running into this, but sadly I have like 150+ mods. I might try forcing options file into the etc and see if it will force it and just prune the options file down.

@Boshigiri
Copy link

latest.log
I I tested all mods with bisection, finally only installed balm, defaultoptions and curios, and this bug still occurred
The keybinds will reset at every launch

@BlayTheNinth BlayTheNinth moved this from 📧 On Hold to 🌟 Next Items in Issues Nov 6, 2024
@Tapacywka
Copy link

Tapacywka commented Nov 13, 2024

Hello! I am the author of the Forgified Core modpack, in which I use your Default Options mod. Before exporting the modpack, I configured the controls to my needs and entered the world to export these settings via the /defaultoptions saveAll command. I placed the generated files (options.txt and keybindings.txt) in the .minecraft/config/defaultoptions/ path, and then exported the modpack. When you first launch the modpack (i.e. when you first install/import it via Modrinth), everything works fine, my custom control settings are set. But as soon as I exit the modpack and enter it back, the control settings are reset to default values, and to return those that I set myself, I need to click the "Reset Keys" button.

But as soon as I enter the modpack again, the control settings are reset to default again. Moreover, before launching the modpack, I opened options.txt to see what the control settings were before launching. And my custom settings were there. After that, I entered the game and looked at this file again - my custom control settings were still there. But as soon as I opened the control settings menu itself, I saw that the default values ​​​​are still there, and when I went back to the options.txt file to inspect it, I was offered to overwrite it, although I did not touch anything in the control settings menu. And when I agreed to overwrite, I saw that the control settings were also reset to default values, just like in the control settings menu in the game. Later I managed to find out that it has something to do with the knownkeys.txt file, which is located in the root folder of the game. If you delete this file and try to enter the game again, this time the control settings will be custom, meaning everything will work as expected. But if you enter the game again when this file has already been generated, the control settings will be reset to default again due to the presence of this file in the root folder of the game.

This "anomaly" can be tested in the most current version of my modpack for 1.21.1. Simply run it twice. The first time, the custom control settings will be saved, the second time, they will be overwritten with the default ones. Then you can delete knownkeys.txt and enter the game again - the custom control settings will be in place again. Then try to enter the game without deleting knownkeys.txt - the control settings will be reset to default again.

https://modrinth.com/modpack/forgified-core

@Tapacywka
Copy link

I also noticed that in the 1.20.1 version of the mod the format of the control settings in the keybindings.txt file is as follows:
image

But in version 1.21.1 the format is different, namely: :NONE is no longer added at the end of each of the settings.
image

Could this be the cause of this bug?

@justwiebe
Copy link

justwiebe commented Nov 30, 2024

I tried adding the NONE back in after a : with a new line after it but that didn't fix it. Disabling DefaultOptions as a mod did fix it. To note, my modpack also has Balm and Curios

@KakashoLin
Copy link

Having the same issue. I have been using this mod for months, and based on feedback, I just don't think it is working anymore.

@unilock
Copy link

unilock commented Dec 11, 2024

Could this possibly be related to this WTHIT issue?

badasintended/wthit#296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected Minecraft 1.21 Issues occurring in Minecraft 1.21.x needs repro This issue needs a reproduction case before it can be solved NeoForge Issues occurring on the NeoForge platform
Projects
Status: 🌟 Next Items
Development

No branches or pull requests

9 participants