Skip to content

Commit

Permalink
use left click for click action (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-luger committed Jun 29, 2023
1 parent 72ba24f commit 4989354
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/torui/coflsky/gui/bingui/BinGuiCurrent.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ public void onDrawGuiScreen(GuiScreenEvent.DrawScreenEvent.Pre event) {
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, 2, 3, mc.thePlayer);
mc.playerController.windowClick(this.chestGui.inventorySlots.windowId, 31, 0, 0, mc.thePlayer);
wasMouseDown = false;
buyState = BuyState.CONFIRM;
}
} else if (guiName.equalsIgnoreCase("Confirm Purchase") && buyState == BuyState.BUYING) {
mc.playerController.windowClick(this.chestGui.inventorySlots.windowId, 11, 2, 3, mc.thePlayer);
mc.playerController.windowClick(this.chestGui.inventorySlots.windowId, 11, 0, 0, mc.thePlayer);
resetGUI();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/torui/coflsky/gui/tfm/ButtonRemapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ public void onPostRenderEvent(GuiScreenEvent.DrawScreenEvent.Post event) {

private void clickSlot(int windowId, int slot) {
Minecraft.getMinecraft().playerController.windowClick(windowId,
slot, 2, 3, Minecraft.getMinecraft().thePlayer);
slot, 0, 0, Minecraft.getMinecraft().thePlayer);
}

private void handleBuyClick(GuiChest currentScreen, GuiScreenEvent.MouseInputEvent.Pre event) {
Expand Down

0 comments on commit 4989354

Please sign in to comment.