diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-24 17:41:17 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-03-24 17:41:17 +0100 |
commit | bb35657f6c5869f04c4ce633446a1809a07a0c07 (patch) | |
tree | 1114bb5560dccc7e554fcf363140cfb1bda90d0d /src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt | |
parent | 3adeb49eca10cd9c5408d0850e3b93fc57954dca (diff) | |
download | skyhanni-bb35657f6c5869f04c4ce633446a1809a07a0c07.tar.gz skyhanni-bb35657f6c5869f04c4ce633446a1809a07a0c07.tar.bz2 skyhanni-bb35657f6c5869f04c4ce633446a1809a07a0c07.zip |
started with new gui editor
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() |