From 012e3dc70ff72590019d3f07602b0371c3b6f778 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 5 Dec 2020 15:52:50 -0500 Subject: Allow middle mouse click for mouse events --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 41611d5..0a3e337 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2771,12 +2771,12 @@ public class DankersSkyblockMod } } } - + @SubscribeEvent public void onGuiMouseInputPre(GuiScreenEvent.MouseInputEvent.Pre event) { if (!Utils.inSkyblock) return; - if (Mouse.getEventButton() != 0 && Mouse.getEventButton() != 1) return; // Left click or right click - if (!Mouse.isButtonDown(0) && !Mouse.isButtonDown(1)) return; + if (Mouse.getEventButton() != 0 && Mouse.getEventButton() != 1 && Mouse.getEventButton() != 2) return; // Left click or right click + if (!Mouse.isButtonDown(0) && !Mouse.isButtonDown(1) && !Mouse.isButtonDown(2)) return; if (event.gui instanceof GuiChest) { Container containerChest = ((GuiChest) event.gui).inventorySlots; -- cgit