diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 54ff70886..f3d734dcb 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.config.core.config.Position import at.hannibal2.skyhanni.config.core.config.gui.GuiPositionEditor import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.utils.LorenzUtils +import at.hannibal2.skyhanni.utils.LorenzUtils.isRancherSign import at.hannibal2.skyhanni.utils.NEUItems import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest @@ -34,8 +35,13 @@ class GuiEditManager { if (NEUItems.neuHasFocus()) return + val screen = Minecraft.getMinecraft().currentScreen + if (screen is GuiEditSign) { + if (!screen.isRancherSign()) return + } + if (isInGui()) return - openGuiEditor() + openGuiPositionEditor() } @SubscribeEvent(priority = EventPriority.LOWEST) @@ -63,7 +69,7 @@ class GuiEditManager { } @JvmStatic - fun openGuiEditor() { + fun openGuiPositionEditor() { SkyHanniMod.screenToOpen = GuiPositionEditor(latestPositions.values.toList(), 2) } |