diff --git a/src/main/java/baubles/client/gui/GuiPlayerExpanded.java b/src/main/java/baubles/client/gui/GuiPlayerExpanded.java index 1ace4c6..944e1de 100644 --- a/src/main/java/baubles/client/gui/GuiPlayerExpanded.java +++ b/src/main/java/baubles/client/gui/GuiPlayerExpanded.java @@ -7,11 +7,13 @@ import codechicken.nei.api.INEIGuiHandler; import codechicken.nei.api.TaggedInventoryArea; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Optional; + import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.client.resources.I18n; +import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; @@ -312,6 +314,16 @@ public class GuiPlayerExpanded extends GuiContainer implements INEIGuiHandler { return Collections.emptyList(); } + @Override + protected void handleMouseClick(Slot slotIn, int slotId, int clickedButton, int clickType) { + + if (slotIn != null && clickType == 4 && slotIn.xDisplayPosition < 0 && !useOldGuiRendering) { + clickType = 0; + } + + super.handleMouseClick(slotIn, slotId, clickedButton, clickType); + } + @Override @Optional.Method(modid = "NotEnoughItems") public boolean handleDragNDrop(GuiContainer gui, int mousex, int mousey, ItemStack draggedStack, int button) { diff --git a/src/main/java/baubles/common/container/ContainerPlayerExpanded.java b/src/main/java/baubles/common/container/ContainerPlayerExpanded.java index fb45cb1..0507180 100644 --- a/src/main/java/baubles/common/container/ContainerPlayerExpanded.java +++ b/src/main/java/baubles/common/container/ContainerPlayerExpanded.java @@ -112,7 +112,7 @@ public class ContainerPlayerExpanded extends Container { @Override public void onCraftMatrixChanged(IInventory par1IInventory) { if (!useOldGuiRendering) { - this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.thePlayer.worldObj)); + this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.thePlayer.worldObj)); } } @@ -129,7 +129,9 @@ public class ContainerPlayerExpanded extends Container { } this.craftResult.setInventorySlotContents(0, (ItemStack) null); - //if (!player.worldObj.isRemote) {PlayerHandler.setPlayerBaubles(player, baubles);} + if (!player.worldObj.isRemote) { + PlayerHandler.setPlayerBaubles(player, baubles); + } } } diff --git a/src/main/java/baubles/common/event/KeyHandler.java b/src/main/java/baubles/common/event/KeyHandler.java index 253e763..11f96dc 100644 --- a/src/main/java/baubles/common/event/KeyHandler.java +++ b/src/main/java/baubles/common/event/KeyHandler.java @@ -1,8 +1,8 @@ package baubles.common.event; - import org.lwjgl.input.Keyboard; +import baubles.common.network.PacketHandler; import baubles.common.network.server.PacketOpenBaublesInventory; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.gameevent.InputEvent;