TrashSlot

TrashSlot

24M Downloads

Sophisticated backpacks with no sort/memory slots break the item delete hotkey

Nicodemus111 opened this issue ยท 3 comments

commented

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

commented

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.

commented
  1. Give yourself any backpack from sophisticated backpacks
  2. Open the backpack and put an item in the first slot
  3. Enable the trash slot for the backpack gui
  4. Click on the settings icon within the backpack gui
  5. Click on slot memory
  6. Click on the item
  7. Go back to the main backpack gui
  8. Press the delete item hotkey on the item
  9. For me this would cause the item to be picked up and not trashed
commented

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.