diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-01-07 03:34:10 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-01-07 03:34:10 +0100 |
commit | 7d0223d1cbc09909b8989c8aea2576a171acdaea (patch) | |
tree | 4d1024f7375c11ba15f5dd348fd4503aae1ddd7d /src/main/java/at/hannibal2/skyhanni/features | |
parent | 319654afd68440c9cbc2eedd3ae4718b5c045519 (diff) | |
download | skyhanni-7d0223d1cbc09909b8989c8aea2576a171acdaea.tar.gz skyhanni-7d0223d1cbc09909b8989c8aea2576a171acdaea.tar.bz2 skyhanni-7d0223d1cbc09909b8989c8aea2576a171acdaea.zip |
replaced "text to render" to "display"
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
4 files changed, 20 insertions, 20 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt index eb6d98d31..200c3e69e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarBestSellMethod.kt @@ -15,18 +15,18 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class BazaarBestSellMethod { companion object { - private var textToRender = "" + private var display = "" } @SubscribeEvent fun onBackgroundDrawn(event: GuiContainerEvent.CloseWindowEvent) { - textToRender = "" + display = "" } @SubscribeEvent fun onGuiDraw(event: GuiScreenEvent.DrawScreenEvent.Post) { if (!isEnabled()) return - textToRender = getNewText(event) + display = getNewText(event) } private fun getNewText(event: GuiScreenEvent.DrawScreenEvent.Post): String { @@ -74,7 +74,7 @@ class BazaarBestSellMethod { fun renderOverlay(event: GuiScreenEvent.BackgroundDrawnEvent) { if (!isEnabled()) return - SkyHanniMod.feature.bazaar.bestSellMethodPos.renderString(textToRender) + SkyHanniMod.feature.bazaar.bestSellMethodPos.renderString(display) } private fun isEnabled(): Boolean { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt index 672e2d262..e40b66968 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt @@ -12,7 +12,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class DungeonDeathCounter { - private var textToRender = "" + private var display = "" private var deaths = 0 private fun isDeathMessage(message: String): Boolean = when { @@ -60,7 +60,7 @@ class DungeonDeathCounter { private fun update() { if (deaths == 0) { - textToRender = "" + display = "" return } @@ -69,7 +69,7 @@ class DungeonDeathCounter { 3 -> "§c" else -> "§4" } - textToRender = color + "Deaths: $deaths" + display = color + "Deaths: $deaths" } @SubscribeEvent @@ -89,7 +89,7 @@ class DungeonDeathCounter { if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return - SkyHanniMod.feature.dungeon.deathCounterPos.renderString(DungeonMilestonesDisplay.color + textToRender) + SkyHanniMod.feature.dungeon.deathCounterPos.renderString(DungeonMilestonesDisplay.color + display) } private fun isEnabled(): Boolean { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt index 9457d4a5d..692a077de 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt @@ -15,7 +15,7 @@ class DungeonMilestonesDisplay { companion object { - private var textToRender = "" + private var display = "" var color = "" var currentMilestone = 0 var timeReached = 0L @@ -40,8 +40,8 @@ class DungeonMilestonesDisplay { private fun checkVisibility() { if (currentMilestone >= 3) { if (System.currentTimeMillis() > timeReached + 3_000) - if (textToRender != "") { - textToRender = textToRender.substring(1) + if (display != "") { + display = display.substring(1) } } } @@ -68,12 +68,12 @@ class DungeonMilestonesDisplay { 2 -> "§e" else -> "§a" } - textToRender = "Current Milestone: $currentMilestone" + display = "Current Milestone: $currentMilestone" } @SubscribeEvent fun onWorldChange(event: WorldEvent.Load) { - textToRender = "" + display = "" currentMilestone = 0 } @@ -88,7 +88,7 @@ class DungeonMilestonesDisplay { if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return - SkyHanniMod.feature.dungeon.showMileStonesDisplayPos.renderString(color + textToRender) + SkyHanniMod.feature.dungeon.showMileStonesDisplayPos.renderString(color + display) } private fun isEnabled(): Boolean { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt index d00d7a0df..44e9332f4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt @@ -23,7 +23,7 @@ class NonGodPotEffectDisplay { private var checkFooter = false private val activeEffects = mutableMapOf<String, Long>() - private val textToRender = mutableListOf<String>() + private val display = mutableListOf<String>() private var lastTick = 0L private var nonGodPotEffects = mapOf( @@ -58,7 +58,7 @@ class NonGodPotEffectDisplay { private fun format() { val now = System.currentTimeMillis() - textToRender.clear() + display.clear() if (activeEffects.values.removeIf { now > it }) { //to fetch the real amount of active pots totalEffectsCount = 0 @@ -72,12 +72,12 @@ class NonGodPotEffectDisplay { val color = colorForTime(seconds) - textToRender.add("$label $color$format") + display.add("$label $color$format") } val diff = totalEffectsCount - activeEffects.size if (diff > 0) { - textToRender.add("§eOpen the /effects inventory") - textToRender.add("§eto show the missing $diff effects!") + display.add("§eOpen the /effects inventory") + display.add("§eto show the missing $diff effects!") checkFooter = true } } @@ -182,7 +182,7 @@ class NonGodPotEffectDisplay { if (event.type != RenderGameOverlayEvent.ElementType.ALL) return if (!isEnabled()) return - SkyHanniMod.feature.misc.nonGodPotEffectPos.renderStrings(textToRender) + SkyHanniMod.feature.misc.nonGodPotEffectPos.renderStrings(display) } @SubscribeEvent |