sakura-ryoko / itemscroller

A client-side Minecraft mod that adds various convenient ways of moving items within inventory GUIs, such as scrolling over stacks to move single items to or from it
GNU Lesser General Public License v3.0
126 stars 9 forks source link

Sorting doesn't always result in a fully sorted inventory #22

Open machasins opened 1 week ago

machasins commented 1 week ago

With some configurations of items, inventories need to be sorted multiple times to result in a actually sorted set of items. This is most common when removing two stacks of items from a chest, sorting the chest, and then re-adding the stacks. The sorting seems to only switch the last non-empty slots of the chest with where the items should be, and doesn't continue sorting from there.

javaw_8voULZNjnm (Note: You can see when the hotkey is used by the contents of the shulker changing, two of the shulkers change places with every sort because they have the same fill level)

The same kind of behavior can be observed in reverse when taking out a single stack of items, and trying to sort it then.

javaw_q2qOrIdpgJ

There is also a smaller issue with items that have the same name, or shulkers that have the same level of fullness (as can be seen in both images). They get offset from their original position by one when repeatedly sorting an inventory. I feel that this could be fixed by offering an option for a secondary sorting priority, or just fixed secondary sorting of Raw ID (or the Raw ID of the first item in a shulker?).

I'd also like to ask for an option to remove the requirement for you to be hovered over an item before sorting the inventory, or at least have it be an option. Also an option for sorting by TOTAL item count, and not just stack size, would be nice.

Thanks 😄

sakura-ryoko commented 5 days ago

Are you using the most recent Github version ?

https://github.com/sakura-ryoko/itemscroller/releases/tag/1.21-0.24.1-sakura.3

Xalum commented 5 days ago

I'm not machasins but I can confirm this happening on the latest Github version. I also second their opinion to revert the requirement to be hovering over an item instead of just the inventory panel

https://github.com/user-attachments/assets/92a3991c-9d96-45aa-b12b-3b9004fe19a3

machasins commented 5 days ago

I can confirm that this is happening with the most recent version.