From 9783bafe0d4d39a3421b0387139a5223e1d437d0 Mon Sep 17 00:00:00 2001 From: "BT (calcastor/mame)" <43831917+calcastor@users.noreply.github.com> Date: Thu, 30 Sep 2021 11:20:18 -0700 Subject: [PATCH] Fix double clicking to stack items Previously PGM used SportPaper's InventoryClickedEvent to handle COLLECT_TO_CURSOR, but since it is no longer used in PGM for compatibility reasons, COLLECT_TO_CURSOR should not be ignored as it can cause issues with double clicking to stack items. Signed-off-by: BT (calcastor/mame) <43831917+calcastor@users.noreply.github.com> --- .../java/tc/oc/pgm/util/listener/ItemTransferListener.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/util/src/main/java/tc/oc/pgm/util/listener/ItemTransferListener.java b/util/src/main/java/tc/oc/pgm/util/listener/ItemTransferListener.java index 542514caea..08af123b6a 100644 --- a/util/src/main/java/tc/oc/pgm/util/listener/ItemTransferListener.java +++ b/util/src/main/java/tc/oc/pgm/util/listener/ItemTransferListener.java @@ -93,7 +93,6 @@ public void onPlayerClickInventory(final InventoryClickEvent event) { // Ignored actions switch (event.getAction()) { case CLONE_STACK: // Out of scope - case COLLECT_TO_CURSOR: // Handled by InventoryClickedEvent case NOTHING: case UNKNOWN: return; @@ -484,9 +483,7 @@ public void collectToCursor(InventoryClickEvent event) { public void onPlayerInventoryClick(InventoryClickEvent event) { // Control-double-click on a stack, all similar stacks are moved to the cursor, up to the max // stack size - // We cancel all of these and redo them ourselves. We have to do it from a InventoryClickedEvent - // because - // we can't make the necessary changes from inside a InventoryClickEvent. + // We cancel all of these and redo them ourselves. if (this.collectToCursor) { this.collectToCursor = false;