From bef2ffc97f9f308beac5685c28fcf7283d2d4cfb Mon Sep 17 00:00:00 2001 From: Matthias Luger Date: Thu, 2 Nov 2023 17:41:41 +0100 Subject: use middle click for button remapping --- src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java | 4 ++-- src/main/java/de/torui/coflsky/gui/tfm/ButtonRemapper.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java b/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java index e742ba0..d860fe3 100644 --- a/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java +++ b/src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java @@ -146,12 +146,12 @@ public class BinGuiCurrent extends GuiChest { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("[§1C§6oflnet§f]§7: §cBed is not purchasable yet.")); buyState = BuyState.INIT; } else { - mc.playerController.windowClick(this.chestGui.inventorySlots.windowId, 31, 0, 0, mc.thePlayer); + mc.playerController.windowClick(this.chestGui.inventorySlots.windowId, 31, 2, 3, mc.thePlayer); wasMouseDown = false; buyState = BuyState.CONFIRM; } } else if (guiName.equalsIgnoreCase("Confirm Purchase") && buyState == BuyState.BUYING) { - mc.playerController.windowClick(this.chestGui.inventorySlots.windowId, 11, 0, 0, mc.thePlayer); + mc.playerController.windowClick(this.chestGui.inventorySlots.windowId, 11, 2, 3, mc.thePlayer); resetGUI(); } } diff --git a/src/main/java/de/torui/coflsky/gui/tfm/ButtonRemapper.java b/src/main/java/de/torui/coflsky/gui/tfm/ButtonRemapper.java index 7d64c64..c63f737 100644 --- a/src/main/java/de/torui/coflsky/gui/tfm/ButtonRemapper.java +++ b/src/main/java/de/torui/coflsky/gui/tfm/ButtonRemapper.java @@ -264,7 +264,7 @@ public class ButtonRemapper { private void clickSlot(int windowId, int slot) { Minecraft.getMinecraft().playerController.windowClick(windowId, - slot, 0, 0, Minecraft.getMinecraft().thePlayer); + slot, 2,3, Minecraft.getMinecraft().thePlayer); } private void handleBuyClick(GuiChest currentScreen, GuiScreenEvent.MouseInputEvent.Pre event) { -- cgit