diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-12 22:31:28 +0200 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-12 22:31:28 +0200 |
| commit | ed62b6ef35c6e174ba2907a788d42ddf6a4c9fe7 (patch) | |
| tree | 1f04e45d8fce0ddac1224475616b61db39e7b92c /src/main/java/at/hannibal2/skyhanni/data | |
| parent | 72eea5d065f9c2ef20ebe8ddf28c602c9f577078 (diff) | |
| download | skyhanni-ed62b6ef35c6e174ba2907a788d42ddf6a4c9fe7.tar.gz skyhanni-ed62b6ef35c6e174ba2907a788d42ddf6a4c9fe7.tar.bz2 skyhanni-ed62b6ef35c6e174ba2907a788d42ddf6a4c9fe7.zip | |
creating globalRenderToggle
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
3 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 2201ffd8b..69cbb0dd3 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.events.LorenzKeyPressEvent +import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isRancherSign import at.hannibal2.skyhanni.utils.NEUItems @@ -65,6 +66,7 @@ class GuiEditManager { @JvmStatic fun renderLast() { if (!isInGui()) return + if (!SkyHanniDebugsAndTests.globalRenderToggle) return GlStateManager.translate(0f, 0f, 200f) diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt index 30f2b51b7..f48829e22 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt @@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.events.GuiRenderItemEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.mixins.transformers.gui.AccessorGuiContainer +import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.drawSlotText @@ -39,6 +40,7 @@ class ItemTipHelper { @SubscribeEvent(priority = EventPriority.HIGHEST) fun onRenderInventoryItemOverlayPost(event: DrawScreenAfterEvent) { if (!LorenzUtils.inSkyBlock) return + if (!SkyHanniDebugsAndTests.globalRenderToggle) return val gui = Minecraft.getMinecraft().currentScreen if (gui !is GuiChest) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt index 1d7a544ca..6479816ef 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/RenderGuiData.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI +import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.client.gui.inventory.GuiInventory @@ -15,6 +16,7 @@ class RenderGuiData { @SubscribeEvent fun onRenderOverlay(event: RenderGameOverlayEvent.Pre) { if (event.type != RenderGameOverlayEvent.ElementType.HOTBAR) return + if (!SkyHanniDebugsAndTests.globalRenderToggle) return if (GuiEditManager.isInGui() || FFGuideGUI.isInGui()) return GuiRenderEvent.GuiOverlayRenderEvent().postAndCatch() @@ -22,6 +24,7 @@ class RenderGuiData { @SubscribeEvent fun onBackgroundDraw(event: GuiScreenEvent.BackgroundDrawnEvent) { + if (!SkyHanniDebugsAndTests.globalRenderToggle) return if (GuiEditManager.isInGui() || FFGuideGUI.isInGui()) return val currentScreen = Minecraft.getMinecraft().currentScreen ?: return if (currentScreen !is GuiInventory && currentScreen !is GuiChest) return |
