From c18aa60c33a8d70938c023ccef79bd4666b1921b Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Fri, 3 May 2024 19:20:13 +1000 Subject: Add CTRL+F to open ah/bz search menus (#1141) --- src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index f13462bc..14a5072b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -2393,6 +2393,13 @@ public class Utils { ); } + public static void sendMiddleMouseClick(int windowId, int slot) { + Minecraft.getMinecraft().playerController.windowClick( + windowId, + slot, 2, 3, Minecraft.getMinecraft().thePlayer + ); + } + public static String timeSinceMillisecond(long time) { Instant lastSave = Instant.ofEpochMilli(time); LocalDateTime lastSaveTime = LocalDateTime.ofInstant(lastSave, TimeZone.getDefault().toZoneId()); -- cgit