From 3d8a129531e51ec4106bebc7a95b74a50c54ce57 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Sun, 8 Jun 2014 18:10:25 -0500 Subject: [PATCH] Fixed Bug: #0518 - Using the WAT and switch via quickslots closes WAT GUI --- client/gui/AEBaseGui.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/gui/AEBaseGui.java b/client/gui/AEBaseGui.java index c883d68b..51cc0a25 100644 --- a/client/gui/AEBaseGui.java +++ b/client/gui/AEBaseGui.java @@ -293,6 +293,17 @@ public abstract class AEBaseGui extends GuiContainer { if ( p_146983_1_ == this.mc.gameSettings.keyBindsHotbar[j].getKeyCode() ) { + for (Slot s : (List) inventorySlots.inventorySlots) + { + if ( s.getSlotIndex() == j && s.inventory == ((AEBaseContainer) inventorySlots).getPlayerInv() ) + { + if ( !s.canTakeStack( ((AEBaseContainer) inventorySlots).getPlayerInv().player ) ) + { + return false; + } + } + } + if ( theSlot.getSlotStackLimit() == 64 ) { this.handleMouseClick( theSlot, theSlot.slotNumber, j, 2 );