From 635d6cee39cf710286364c47d3419bd6e923a513 Mon Sep 17 00:00:00 2001 From: HiZe_ Date: Tue, 11 Jul 2023 10:38:22 +0200 Subject: Merge pull request #302 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feature * save * changed things, fixed things * fixes * Merge branch 'beta' of https://github.com/hannibal002/skyhanni into h… * typo * changed how seeThrough work * moved function to entityutils * updated desc in config * changed value * Blood Ichor highlight * added killer spring highlight * warning for twinclaws * forgot to add config for twinclaws * renamed class * changed twinclaws title to be bold, moved it up a bit and extended ti… * always highlight co-op boss * save * config option for blood ichor beam * checking distance before processing * update * fixes * small fixes * changed detection from 20 to 15 blocs * merged beta * fixed crash with conflicting class name * moved everything in its own config, add steak title for each section * wording * Merge branch 'beta' into highlight_own_vampire * Moving vampire config into slayer category * Fixed one thing * IntelliJ auto formattings * IntelliJ auto formattings * Unnecessary check * code cleanup * parameter is already default false * moved distance check * merged beta * Fixed shouldRender --- src/main/java/at/hannibal2/skyhanni/data/TitleUtils.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni/data') diff --git a/src/main/java/at/hannibal2/skyhanni/data/TitleUtils.kt b/src/main/java/at/hannibal2/skyhanni/data/TitleUtils.kt index c43511afa..d66a321b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/TitleUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/TitleUtils.kt @@ -13,10 +13,12 @@ class TitleUtils { companion object { private var display = "" private var endTime = 0L + private var heightModifier = 1.8 - fun sendTitle(text: String, duration: Int) { + fun sendTitle(text: String, duration: Int, height: Double = 1.8) { display = "§f$text" endTime = System.currentTimeMillis() + duration + heightModifier = height } } @@ -38,7 +40,7 @@ class TitleUtils { val renderer = Minecraft.getMinecraft().fontRendererObj GlStateManager.pushMatrix() - GlStateManager.translate((width / 2).toFloat(), (height / 1.8).toFloat(), 0.0f) + GlStateManager.translate((width / 2).toFloat(), (height / heightModifier).toFloat(), 0.0f) GlStateManager.scale(4.0f, 4.0f, 4.0f) TextRenderUtils.drawStringCenteredScaledMaxWidth(display, renderer, 0f, 0f, false, 75, 0) GlStateManager.popMatrix() -- cgit