From d1eb2d2b2820112d1ca03cecb0e3533fabbc0fec Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Wed, 25 Jan 2023 19:35:23 +0100 Subject: Recipe hotkeys in experimentation table. (#568) Prevent recipe hotkeys (R + U) when inside the experimentation table. Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java index 004ea372..bd45f3e1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingOverlay.java @@ -20,6 +20,7 @@ package io.github.moulberry.notenoughupdates.recipes; import io.github.moulberry.notenoughupdates.NEUManager; +import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers; import io.github.moulberry.notenoughupdates.mixins.AccessorGuiContainer; import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; @@ -114,6 +115,8 @@ public class CraftingOverlay { if (!Keyboard.getEventKeyState() || (Keyboard.getEventKey() != Keyboard.KEY_U && Keyboard.getEventKey() != Keyboard.KEY_R)) return; + if (EnchantingSolvers.currentSolver != EnchantingSolvers.SolverType.NONE) return; + runIfCraftingOverlayIsPresent(event.gui, (guiChest, chest) -> { int mouseX = Utils.getMouseX(); int mouseY = Utils.getMouseY(); -- cgit