
Suggestion: scrolling items from a container should put them on the player's hotbar first, rather than last
elwood612 opened this issue ยท 6 comments
(I suppose this could be a config option, to avoid being too big of a change for current players)
I've always found it strange that in vanilla, when you shift-click a stack from a chest into your inventory, it will prioritize your hotbar, if a slot is available. But MouseTweaks will always put the items in your inventory top-first, meaning that even if a slot is open on your hotbar, it won't go there.
This is a small QOL suggestion that would be immensely satisfying to finally fix. It bugs me every time I scroll an item, because I have to scroll it out of the chest, then shift-click it onto my hotbar.
Hmm, need to check what the shift-click logic does. Matching it here indeed seems to make sense
Sorry for the ping. Any news on checking the vanilla shift-click logic? Making MousTweaks mimic that behavior would be a massive QOL boost in my opinion. Thanks!
It looks like #156 mirrors the vanilla logic for reverse-order for everything. If I scroll a furnace's fuel slot it starts in hotbar slot 9 like a crafting result would, and so do chests. Essentially, the PR would force default scrolling to hotbar first regardless of Vanilla mechanics.
Personally, I would prefer start at hotbar slot 1 to 9 and then the 27 but because of how the inventory is laid out that wouldn't be very elegant.
This seems like the thing that Mojang would change when they get around to it or when they realise it, I would not invest the energy in hardcoding to match for vanilla inventory behaviour and hope it gets resolved down the line in a way that is more elegant.
There's more info on specific inventories here MC-114479
I cannot call the logic from Minecraft itself because it's entrenched in server-side item-movement logic.
That is unfortunate, and I understand the reluctance to get too far into the weeds in such a needlessly complicated system.
I'm honestly not sure it's a good idea to replicate all of this logic in Mouse Tweaks because it has a high potential of breaking with updates, and it would be pretty much impossible to accurately support modded inventories.
Yeah agreed 100%, this isn't worth slowing down your porting process or jeopardizing future support.
All that being said, I do think there's an argument to be made that shift-clicking in reverse order (so hotbar first) is more common in normal gameplay: how often do you shift-click something from the input slots back into your inventory? Whereas shift-clicking out of a chest or an output slot is extremely common. It's also more convenient for the user (or I wouldn't be asking), since the whole point of this MouseTweak is to quickly grab single items out of stacks, which could then immediately be placed in-game without opening the inventory again. And if you're grabbing from a chest in order to craft something, there's no change.
I basically don't see a vanilla use-case where reverse order (hotbar first) wouldn't be better, and in fact in most cases it would better match vanilla behavior. However, I can't possibly comment on mod compatibility and modded use-cases. If time weren't a factor giving the user the choice through a config might be a nice idea. As it is though I still think my original suggestion stands.
So I'm looking into it, and the way it's implemented in vanilla is actually completely custom and hardcoded for individual inventories and even for individual slots. E.g. chests and hoppers will "shift-click" to the player inventory in reverse order (starting from the hotbar), but if you take a crafting table or a furnace, then only the crafting result slot will "shift-click" in reverse order, whereas the crafting grid or input slots will "shift-click" in normal order, like Mouse Tweaks.
I'm honestly not sure it's a good idea to replicate all of this logic in Mouse Tweaks because it has a high potential of breaking with updates, and it would be pretty much impossible to accurately support modded inventories. I cannot call the logic from Minecraft itself because it's entrenched in server-side item-movement logic.
I guess you could make an argument that inventories/slots that move in reverse order are more frequent, so Mouse Tweaks should just default to it when targeting the player inventory. Do you think that would be a good idea? Or are there also frequently used inventories where the order matches Mouse Tweaks?