From cdfb0da5c9b19120520070912f005c586a1b4d7b Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sun, 23 Mar 2014 12:59:43 +0100 Subject: [PATCH] Fixed bug where shift right clicking potion ingredients was broken --- .../java/com/gmail/nossr50/listeners/InventoryListener.java | 5 ++++- .../gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java index 779eaee6a..00d8fe3d1 100644 --- a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java @@ -183,7 +183,10 @@ public class InventoryListener implements Listener { return; } - AlchemyPotionBrewer.transferItems(event.getView(), event.getRawSlot(), click); + if (!AlchemyPotionBrewer.transferItems(event.getView(), event.getRawSlot(), click)) { + return; + } + event.setCancelled(true); AlchemyPotionBrewer.scheduleUpdate(inventory); AlchemyPotionBrewer.scheduleCheck(player, stand); diff --git a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java index d61592e98..5890095eb 100644 --- a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java +++ b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyPotionBrewer.java @@ -161,7 +161,7 @@ public final class AlchemyPotionBrewer { } from.setAmount(fromAmount - 1); - view.setItem(Alchemy.INGREDIENT_SLOT, emptyTo ? null : to); + view.setItem(Alchemy.INGREDIENT_SLOT, to); view.setItem(fromSlot, from); return true;