Skip to content

Commit

Permalink
fix: šŸ› Fixed sorting to trigger when cursor is anywhere outside of stā€¦
Browse files Browse the repository at this point in the history
ā€¦orage slots. Fixes the behavior where sorting mods would sort sophisticated inventories when middle click is used with cursor outside of any slot which caused item loss for example when stack upgrades were used.
  • Loading branch information
P3pp3rF1y committed Nov 6, 2024
1 parent 9d42dbb commit f272a76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ loader_version_range=[4,)
mod_id=sophisticatedstorage
mod_name=Sophisticated Storage
mod_license=GNU General Public License v3.0
mod_version=0.10.47
mod_version=0.10.48
mod_group_id=sophisticatedstorage
mod_authors=P3pp3rF1y, Ridanisaurus
mod_description=Fancy and functional storage containers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ private static boolean tryCallSort(Screen gui) {
double mouseX = mh.xpos() * mc.getWindow().getGuiScaledWidth() / mc.getWindow().getScreenWidth();
double mouseY = mh.ypos() * mc.getWindow().getGuiScaledHeight() / mc.getWindow().getScreenHeight();
Slot selectedSlot = screen.findSlot(mouseX, mouseY);
if (selectedSlot != null && container.isNotPlayersInventorySlot(selectedSlot.index)) {
if (selectedSlot == null || container.isNotPlayersInventorySlot(selectedSlot.index)) {
container.sort();
return true;
}
Expand Down

0 comments on commit f272a76

Please sign in to comment.