TheCBProject / NotEnoughItems

MIT License
48 stars 19 forks source link

Inventory > Disable Mouse Wheel Transfer doesn't function properly #190

Closed Xetaxheb closed 3 years ago

Xetaxheb commented 6 years ago

Yes, I have mouse tweaks and jei (and inventorytweaks, and craftingtweaks, neither of which should be relevant) installed. When I turn it to true in NEI, I would expect mouse tweaks to take over and function as intended, like it does with NEI not installed, but there's strange behavior involving dropped inputs where "1 scroll = 1 item" is more like "30% chance of any given scroll = 1 item". This is clearly an NEI bug, as mousetweaks works fine when NEI is not loaded. Somehow the "Disable mouse wheel transfer" option is still loading code that interferes when set to "true".

Pretty sure it's because you're overriding a function here https://github.com/TheCBProject/NotEnoughItems/blob/7943831c2a8898fd6805d39fba57397742ba37f9/src/main/java/codechicken/nei/NEIController.java#L105

Shouldn't the check for !NEIClientConfig.isMouseScrollTransferEnabled be elsewhere?

covers1624 commented 5 years ago

I can confirm that disabling scroll transfer disables it correctly in dev.

Xetaxheb commented 5 years ago

I'm not sure if you mean 2.4.2.240 as dev or some local repo you have personally. This is still an issue. I originally submitted this issue on MouseTweaks 2.8 but now i'm on MouseTweaks 2.9 (which has an "inventory aware scroll location" alternative option now that I haven't tested/used).

Forge 14.23.5.2796 / NotEnoughItems-1.12.2-2.4.2.240-universal.jar / MouseTweaks-2.9-mc1.12.2.jar (down push up pull is default, up push down pull is inverted; last to first search order by default) (also included in test pack with default settings CodeChickenLib-1.12.2-3.2.2.353-universal.jar / jei_1.12.2-4.14.3.242.jar / InventoryTweaks-1.64+dev.144.jar / CraftingTweaks_1.12.2-8.1.9.jar )

NEI Disable: false + NEI Invert: false + MT Invert: false = best results but rare strangeness; not preferred direction however and nei's still enabled
NEI Disable: false + NEI Invert: false + MT Invert: true = clearly buggy behavior as the directions conflict
NEI Disable: false + NEI Invert: true + MT Invert: false = clearly buggy behavior as the directions conflict
NEI Disable: false + NEI Invert: true + MT Invert: true = mostly correct behavior although i'd swear scrolling too fast drops inputs very very rarely
NEI Disable: true + NEI Invert: false + MT Invert: false = buggy behavior, sometimes scroll inputs are dropped (sometimes several in a row)
NEI Disable: true + NEI Invert: false + MT Invert: true = buggy behavior, sometimes scroll inputs are dropped (sometimes several in a row)
NEI Disable: true + NEI Invert: true + MT Invert: false = buggy behavior, sometimes scroll inputs are dropped (sometimes several in a row)
NEI Disable: true + NEI Invert: true + MT Invert: true = buggy behavior, sometimes scroll inputs are dropped (sometimes several in a row)

These issues are exacerbated quite a lot in "heavy" packs, but again only occur with NEI present. It can be difficult to trigger or notice in a basically vanilla pack, although it definitely still does. I know with certainty it's not user error, hardware issues, or other non-code-based problems. Removing NEI entirely makes scrolling work flawlessly. No dropped inputs in any circumstance. My mouse has haptic feedback every time the wheel fires, so I know exactly how many times I've scrolled. (scrolling a webpage for instance, I can scroll almost as fast as I want and will end up exactly at the same spot based on number of ticks of the wheel)

Additionally, while this is all 100% reproducible for me, another issue I've encountered I assume is related is sometimes opening chests/etc and then trying to scroll things won't be immediately responsive. I have not gone in depth to test or document this but it only happens with NEI installed to my (possibly questionable) recollection.

covers1624 commented 5 years ago

By in dev i mean the repo here, Ill take another look but im fairly sure this is not an NEI bug, the option to disable scroll wheel works perfectly fine.