ModsByLeo / DontDropIt

Prevents accidental dropping of items via various means.
https://modrinth.com/mod/dont-drop-it
MIT License
13 stars 10 forks source link

Toggle drop delay keybind issues #36

Closed Birdatiel closed 2 years ago

Birdatiel commented 2 years ago

Is there an existing issue for this?

Version information

2.4.2+1.19

Expected Behavior

When toggle drop delay key is pressed it should toggle the drop delay

Actual Behavior

When it's toggled off (with the key) and I close minecraft, the next time I open it the toggle drop delay key stops working. I have to go into configuration and set activation mode to on to get it to start working again.

I didn't get to test this but I'm assuming this is what's causing the issue because it's the only thing that made sense to me

Reproduction Steps

  1. Bind a key to toggle drop delay
  2. Toggle it off with the key
  3. Close minecraft
  4. Open it again and go into a world
  5. Toggle it back on with the key and it wont work

Java version

Java 18

Additional information

I do have a few other mods installed but none of them affect keybinding except amecs, too many binds, and no more useless keys installed (I'm not using any of these for the toggle drop key binding though, I have it set to right arrow). I don't think they cause the issue I'm having with this mod though.

Leo40Git commented 2 years ago

The way the key works is that it sets the activation mode to DISABLED while saving the original activation mode (not in the config). I should probably just make it a isDropDelayInhibited flag or something...

Birdatiel commented 2 years ago

From my limited coding knowledge that sounds like a good solution. I was thinking that the activation mode should be for the whole drop delay feature while the keybind should have its own hidden toggle (which sounds like the same thing you said?)