diff --git a/src/main/java/com/cleanroommc/groovyscript/keybinds/CopyKey.java b/src/main/java/com/cleanroommc/groovyscript/keybinds/CopyKey.java index b1a4c7ff3..6b2bb4d98 100644 --- a/src/main/java/com/cleanroommc/groovyscript/keybinds/CopyKey.java +++ b/src/main/java/com/cleanroommc/groovyscript/keybinds/CopyKey.java @@ -35,17 +35,14 @@ private static void gatherInfo(InfoParserPackage info, EntityPlayer player) { if (mc.inGameHasFocus) { info.copyFromPlayer(player); } else { - var jei = ModSupport.JEI.isLoaded(); if (mc.currentScreen instanceof GuiContainer container) { var slot = container.getSlotUnderMouse(); if (slot != null) { info.setStack(slot.getStack()); - } else if (jei && info.getStack().isEmpty()) { - // check sidebars of normal guis - info.setStack(getJeiStack()); } - } else if (jei && getJeiRecipesObject() != null) { - // have to check this separately for if IRecipesGui is open, since its GuiScreen not GuiContainer + } + // if we haven't found anything, check jei + if (ModSupport.JEI.isLoaded() && info.getStack().isEmpty()) { info.setStack(getJeiStack()); } }