diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt index b342fb345..11e6f86f5 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt @@ -14,19 +14,24 @@ class RenderGuiData { @SubscribeEvent fun onRenderOverlay(event: RenderGameOverlayEvent.Pre) { if (event.type != RenderGameOverlayEvent.ElementType.HOTBAR) return + if (GuiEditManager.isInGui()) return GuiRenderEvent.GameOverlayRenderEvent().postAndCatch() } @SubscribeEvent fun onBackgroundDraw(event: GuiScreenEvent.BackgroundDrawnEvent) { + if (GuiEditManager.isInGui()) return val currentScreen = Minecraft.getMinecraft().currentScreen ?: return - if (currentScreen !is GuiInventory && currentScreen !is GuiChest) return GlStateManager.pushMatrix() GlStateManager.enableDepth() + if (GuiEditManager.isInGui()) { + GuiRenderEvent.GameOverlayRenderEvent().postAndCatch() + } + GuiRenderEvent.ChestBackgroundRenderEvent().postAndCatch() GlStateManager.popMatrix() |