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/dungeon | |
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/dungeon')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt | 8 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt | 12 |
2 files changed, 10 insertions, 10 deletions
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 { |