From 4d117625ab3f031e98ba6bcfc18ce1d00bab73ad Mon Sep 17 00:00:00 2001 From: Ranzu <66495944+Ranzuu@users.noreply.github.com> Date: Tue, 3 Nov 2026 17:09:34 +0100 Subject: [PATCH] wrap it - in cosy blankets --- .../gtnewhorizon/gtnhlib/client/title/TitleRenderer.java | 9 +++++++++ .../com/gtnewhorizon/gtnhlib/util/AboveHotbarHUD.java | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/main/java/com/gtnewhorizon/gtnhlib/client/title/TitleRenderer.java b/src/main/java/com/gtnewhorizon/gtnhlib/client/title/TitleRenderer.java index 4041f681..f83cf6e3 100644 --- a/src/main/java/com/gtnewhorizon/gtnhlib/client/title/TitleRenderer.java +++ b/src/main/java/com/gtnewhorizon/gtnhlib/client/title/TitleRenderer.java @@ -13,6 +13,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import com.gtnewhorizon.gtnhlib.GTNHLibConfig; +import com.gtnewhorizon.gtnhlib.compat.DashboardHud; +import com.gtnewhorizon.gtnhlib.compat.Mods; public class TitleRenderer { @@ -86,6 +88,10 @@ public class TitleRenderer { TitleEffectSystem.spawn(effectTier, originX, originY, width, height); } + if (Mods.DASHBOARD && !DashboardHud.beginTitle(res)) { + mc.mcProfiler.endSection(); + return; + } TitleParticleSystem.render(partialTicks); float t01 = total > 0 ? MathHelper.clamp_float((total - f) / (float) total, 0.0F, 1.0F) : 1.0F; float fInEnd = total > 0 ? (float) fadeIn / (float) total : 0.0F; @@ -129,6 +135,9 @@ public class TitleRenderer { GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); + if (Mods.DASHBOARD) { + DashboardHud.endRender(); + } mc.mcProfiler.endSection(); } diff --git a/src/main/java/com/gtnewhorizon/gtnhlib/util/AboveHotbarHUD.java b/src/main/java/com/gtnewhorizon/gtnhlib/util/AboveHotbarHUD.java index 98c2a42e..3182ab69 100644 --- a/src/main/java/com/gtnewhorizon/gtnhlib/util/AboveHotbarHUD.java +++ b/src/main/java/com/gtnewhorizon/gtnhlib/util/AboveHotbarHUD.java @@ -6,6 +6,9 @@ import net.minecraftforge.common.MinecraftForge; import org.lwjgl.opengl.GL11; +import com.gtnewhorizon.gtnhlib.compat.DashboardHud; +import com.gtnewhorizon.gtnhlib.compat.Mods; + import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; @@ -72,6 +75,9 @@ public class AboveHotbarHUD { color = (alpha << 24); } if (alpha > 0) { + if (Mods.DASHBOARD && !DashboardHud.beginAboveHotbarText(event.resolution)) { + return; + } GL11.glPushMatrix(); { GL11.glEnable(GL11.GL_BLEND); @@ -82,6 +88,9 @@ public class AboveHotbarHUD { GL11.glDisable(GL11.GL_BLEND); } GL11.glPopMatrix(); + if (Mods.DASHBOARD) { + DashboardHud.endRender(); + } } } }