Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sorting Sophisticated Backpack inventories can lead to voided items #123

Open
Feliixtc opened this issue Jan 29, 2022 · 6 comments
Open

Comments

@Feliixtc
Copy link

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.

@P3pp3rF1y
Copy link

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

@cpw
Copy link
Owner

cpw commented Sep 2, 2022

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.

@P3pp3rF1y
Copy link

@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

@TheDarkfight21
Copy link

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

@DArkHekRoMaNT
Copy link

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

@Sang-bin
Copy link

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

qyurila pushed a commit to qyurila/inventorysorter that referenced this issue Aug 25, 2024
fix: cpw#152 cpw#121 cpw#123 (partial) cpw#119 cpw#150
# Conflicts:
#	gradle.properties
#	src/main/java/cpw/mods/inventorysorter/InventorySorter.java
#	src/main/java/cpw/mods/inventorysorter/InventorySorterCommand.java
#	src/main/java/cpw/mods/inventorysorter/KeyHandler.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants