From 68284cc4f88bb3a665148c884038abacce23ae2a Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Thu, 25 Jul 2024 01:19:01 +1000 Subject: Fix recipe and usages keybind double triggering (#1265) --- .../github/moulberry/notenoughupdates/miscgui/StorageOverlay.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java index d56faa63..587d20ef 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java @@ -20,7 +20,6 @@ package io.github.moulberry.notenoughupdates.miscgui; import com.google.common.collect.Lists; -import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.NEUManager; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.core.BackgroundBlur; @@ -2151,9 +2150,9 @@ public class StorageOverlay extends GuiElement { String internalName = manager.createItemResolutionQuery().withItemStack(stack).resolveInternalName(); if (internalName == null) continue; - JsonObject item = manager.getItemInformation().get(internalName); - if (keyPressed == manager.keybindViewRecipe.getKeyCode()) manager.showRecipe(item); - if (keyPressed == manager.keybindViewUsages.getKeyCode()) manager.displayGuiItemUsages( + if (keyPressed == manager.keybindViewRecipe.getKeyCode()) manager.displayGuiItemRecipeKeybind( + internalName); + if (keyPressed == manager.keybindViewUsages.getKeyCode()) manager.displayGuiItemUsagesKeybind( internalName); if (keyPressed == NotEnoughUpdates.INSTANCE.config.misc.openAHKeybind) { AhBzKeybind.onKeyPressed(stack); -- cgit