Skip to content

Middle-click on Sophisticated Backpacks GUI closes the screen despite sortRange = "" override #39

Description

@okimazzi

Description:
When Sophisticated Backpacks' GUI is open, pressing the middle mouse button closes the backpack screen instead of doing nothing. This happens even though the default config already includes a container override for the backpack with sortRange = "", which should disable sorting for that container.
The override appears to suppress the sort action itself, but the middle-click event still propagates to the screen and triggers a close. Clicking the backpack's own native sort button (the A-Z button added by Sophisticated) also closes the screen.
Steps to reproduce:

Install Inventory Tweaks: ReFoxed alongside Sophisticated Backpacks.
Bind sort to Middle Button (default).
Open a Sophisticated backpack.
Press the middle mouse button (or click the backpack's native A-Z sort button).
The backpack GUI closes; sorting does not occur.

Expected behavior:

With sortRange = "" set for net.p3pp3rf1y.sophisticatedbackpacks.common.gui.BackpackContainer, middle-click should be ignored inside the backpack GUI and the screen should stay open.
Actual behavior:

The screen closes on middle-click. The server log shows the following error each time:
[Server thread/ERROR] [sophisticatedbackpacks/]: Error getting backpack wrapper - Stack isn't a backpack
Environment:

Minecraft: 1.21.1
Loader: NeoForge 21.1.228
Inventory Tweaks: ReFoxed: invtweaks-1.21.1-1.3.2.jar
Sophisticated Backpacks: 3.25.45 (Sophisticated Core 1.4.39)
Modpack: All The Mods 10

Additional notes:

The relevant screen class is net.p3pp3rf1y.sophisticatedbackpacks.client.gui.BackpackScreen. The config override targets the container class net.p3pp3rf1y.sophisticatedbackpacks.common.gui.BackpackContainer. It's possible the close behavior is tied to the screen-level middle-click handling, which the container-level sortRange override doesn't cover.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions