diff --git a/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiAlchemicalBag.java b/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiAlchemicalBag.java index d37a86bc..38429a6c 100644 --- a/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiAlchemicalBag.java +++ b/src/main/java/com/pahimar/ee3/client/gui/inventory/GuiAlchemicalBag.java @@ -96,4 +96,11 @@ public class GuiAlchemicalBag extends GuiContainer } } } + + @Override + protected boolean checkHotbarKeys(int key) + { + return false; + } + } diff --git a/src/main/java/com/pahimar/ee3/inventory/ContainerAlchemicalBag.java b/src/main/java/com/pahimar/ee3/inventory/ContainerAlchemicalBag.java index b15083d3..ae729502 100644 --- a/src/main/java/com/pahimar/ee3/inventory/ContainerAlchemicalBag.java +++ b/src/main/java/com/pahimar/ee3/inventory/ContainerAlchemicalBag.java @@ -95,15 +95,54 @@ public class ContainerAlchemicalBag extends ContainerEE { if (inventoryAlchemicalBag.parentItemStack.getItemDamage() == 0) { - this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 162)); + if(!(entityPlayer.inventory.getStackInSlot(actionBarSlotIndex)==inventoryAlchemicalBag.parentItemStack)) + { + this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 162)); + } + else + { + this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 162) + { + public boolean canTakeStack(EntityPlayer p_82869_1_) + { + return false; + } + }); + } } else if (inventoryAlchemicalBag.parentItemStack.getItemDamage() == 1) { - this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 216)); + if(!(entityPlayer.inventory.getStackInSlot(actionBarSlotIndex)==inventoryAlchemicalBag.parentItemStack)) + { + this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 216)); + } + else + { + this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 35 + actionBarSlotIndex * 18, 216) + { + public boolean canTakeStack(EntityPlayer p_82869_1_) + { + return false; + } + }); + } } else if (inventoryAlchemicalBag.parentItemStack.getItemDamage() == 2) { - this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 44 + actionBarSlotIndex * 18, 232)); + if(!(entityPlayer.inventory.getStackInSlot(actionBarSlotIndex)==inventoryAlchemicalBag.parentItemStack)) + { + this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 44 + actionBarSlotIndex * 18, 232)); + } + else + { + this.addSlotToContainer(new Slot(entityPlayer.inventory, actionBarSlotIndex, 44 + actionBarSlotIndex * 18, 232) + { + public boolean canTakeStack(EntityPlayer p_82869_1_) + { + return false; + } + }); + } } } }