aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAppability <appable@icloud.com>2022-11-13 23:39:33 -0800
committerAppability <appable@icloud.com>2022-11-13 23:39:33 -0800
commit7cdbe4dcbb8ae7e31dc9b881f347cd54662c845a (patch)
tree4b8137b343739a20b9799eb06ae0d31060175c10 /src
parentf290d5285cb92dd427726cdc203156187690f068 (diff)
downloadAmbientAddons-7cdbe4dcbb8ae7e31dc9b881f347cd54662c845a.tar.gz
AmbientAddons-7cdbe4dcbb8ae7e31dc9b881f347cd54662c845a.tar.bz2
AmbientAddons-7cdbe4dcbb8ae7e31dc9b881f347cd54662c845a.zip
render on top of wither shield actually
Diffstat (limited to 'src')
-rw-r--r--src/main/kotlin/com/ambientaddons/config/Config.kt2
-rw-r--r--src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt2
-rw-r--r--src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/main/kotlin/com/ambientaddons/config/Config.kt b/src/main/kotlin/com/ambientaddons/config/Config.kt
index a717008..fd7aa4b 100644
--- a/src/main/kotlin/com/ambientaddons/config/Config.kt
+++ b/src/main/kotlin/com/ambientaddons/config/Config.kt
@@ -109,7 +109,7 @@ object Config : Vigilant(
selector(
::trapperCooldown,
name = "Show trapper cooldown",
- description = "Shows trapper cooldown above crosshair.",
+ description = "Shows trapper cooldown below crosshair, replacing wither shield display on the Farming Islands.",
options = listOf("Off", "Default", "Shadow", "Outline")
)
}
diff --git a/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt b/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt
index 85801aa..ee3b683 100644
--- a/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt
+++ b/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt
@@ -3,6 +3,7 @@ package com.ambientaddons.features.display
import AmbientAddons.Companion.config
import AmbientAddons.Companion.mc
import com.ambientaddons.utils.Alignment
+import com.ambientaddons.utils.Area
import com.ambientaddons.utils.render.OverlayUtils
import com.ambientaddons.utils.SBLocation
import com.ambientaddons.utils.dungeon.TextStyle
@@ -20,6 +21,7 @@ object WitherShieldOverlay {
fun onRenderOverlay(event: RenderGameOverlayEvent) {
if (event.type != RenderGameOverlayEvent.ElementType.TEXT) return
if (!SBLocation.inSkyblock || config.witherShieldDisplay == 0) return
+ if (config.trapperCooldown != 0 && SBLocation.area == Area.FarmingIslands) return
val diff = ((witherImpactEndTime - System.currentTimeMillis()) / 1000.0).takeIf { it >= 0 } ?: return
val display = ceil(diff).roundToInt().toString()
val resolution = ScaledResolution(mc)
diff --git a/src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt b/src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt
index ce468eb..f850a36 100644
--- a/src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt
+++ b/src/main/kotlin/com/ambientaddons/features/misc/Trapper.kt
@@ -73,7 +73,7 @@ object Trapper {
val display = "§a${ceil(diff).roundToInt()}"
val resolution = ScaledResolution(mc)
val x = resolution.scaledWidth / 2 + 1
- val y = resolution.scaledHeight / 2 - 20
+ val y = resolution.scaledHeight / 2 + 10
val style = TextStyle.fromInt(config.trapperCooldown - 1) ?: return
OverlayUtils.drawString(x, y, display, style, Alignment.Center)
}