Sophisticated backpacks with no sort/memory slots break the item delete hotkey
Nicodemus111 opened this issue ยท 3 comments
Minecraft Version
1.20.1 (LTS)
Mod Loader
Forge
Mod Loader Version
1.20.1-47.1.3
Mod Version
15.1.0+forge-1.20
Balm Version
7.2.2+forge-1.20.1
Describe the Issue
If you try to trash an item with either slot memory or no sort slots selected in a sophisticated backpacks gui it will not trash the item. If the first item in the backpack is a memory slot its icon will show faded over the trash slot.
Logs
No response
Do you use any performance-enhancing mods (e.g. OptiFine) or custom server distributions (e.g. SpongeForge)?
No response
I am not familiar with Sophisticated Backpacks and its features. Please post detailed reproduction steps on what I have to do to reproduce the issue.
- Give yourself any backpack from sophisticated backpacks
- Open the backpack and put an item in the first slot
- Enable the trash slot for the backpack gui
- Click on the settings icon within the backpack gui
- Click on slot memory
- Click on the item
- Go back to the main backpack gui
- Press the delete item hotkey on the item
- For me this would cause the item to be picked up and not trashed
Looking into this, it seems Sophisticated Backpacks deviates too much from Vanilla expectations for TrashSlot to be compatible.
Backpack slots seem to be reporting as empty when memory is used, despite clicking the slot resulting in the item being picked up, so TrashSlot as a safe-guard aborts the deletion.
Furthermore, it seems that Sophisticated Backpacks is overriding the renderSlot method to add a ghost item display, which is causing an incorrect ghost item to be rendered in the trash slot, as it incorrectly assumes it to be a slot in the backpack's inventory.