Inventory Sorter

Inventory Sorter

52M Downloads

Sorting Sophisticated Backpack inventories can lead to voided items

Feliixtc opened this issue ยท 6 comments

commented

Describe the bug
When sorting a backpack equipped with a stack upgrade (increases stack sizes) with the sorting option from the inventorysorter mod it unstacks items into default 64 stacks. Any overflow from this unstacking procedure is deleted.

To Reproduce
Steps to reproduce the behavior:

  1. Open backpack with stack upgrade equipped
  2. Fill backpack at least halfway to keep it simple
  3. Press inventorysorter mod key to sort
  4. See everything unstacked from modified quantities into vanilla stack quantities voiding any excess items in the process.

Expected behavior
Inventory sorting with inventorysorter mod to obey mod stack quantities.

Versions
forge 39.0.40
sophisticatedbackpacks-1.18.1-3.15.1.505
inventorysorter-1.18-19.0.0

Ive posted this on their Git as well. They have responded with it being an issue on this side of the mod conflict.

commented

Just to be clear the issue is that inventory sorter isn't ready for stack sizes higher than stack maxsize and in fact I am pretty sure it's not ready for a bit of additional logic that tries to merge stacks first / put into memorized slots before inserting into empty slot.

For inventory sorter to be compatible I am pretty sure there would be a requirement to implement custom compat code / allow other mods to add their implementation of the support for inventory sorter.

So at the moment the only real solution is to disable sorting for backpacks and have players use sorting built into backpacks. I have added compatibility which uses IMC to automatically disable inventory sorter for backpacks, but it's hitting the issue described here #119

commented

Custom extensions would be difficult. But IMC should work. If it's not, I'll look into it. That's the correct solution - if you know you're incompatible just tell me and I'll skip sorting. Big stack sizes should work. I'll have to test this weekend.

commented

@cpw I may be recalling this incorrectly but I believe last time I tested IMC this line of code ran after IMC and caused whatever mods registered through IMC to be ignored

https://github.com/cpw/inventorysorter/blob/master/src/main/java/cpw/mods/inventorysorter/InventorySorter.java#L126

commented

a solution to no delete item is using the same key for backpack sorting and inventory sorting.

commented

Please blacklist sophisticatedbackpacks:backpack by default. This works fine on 19.0.4 (1.18.2)
The variant with same buttons works in 99% of the cases too. But it is not very good to restore a backpack in 1% of cases

commented

inventorysorter-1.19.2-21.0.4 use
blacklist doesn't work (sophisticatedbackpacks:backpack)