Sorting Sophisticated Backpack inventories can lead to voided items
Feliixtc opened this issue ยท 6 comments
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:
- Open backpack with stack upgrade equipped
- Fill backpack at least halfway to keep it simple
- Press inventorysorter mod key to sort
- 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.
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
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.
@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
a solution to no delete item is using the same key for backpack sorting and inventory sorting.
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