aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt')
-rw-r--r--src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt b/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt
index fa210aa..85801aa 100644
--- a/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt
+++ b/src/main/kotlin/com/ambientaddons/features/display/WitherShieldOverlay.kt
@@ -4,7 +4,7 @@ import AmbientAddons.Companion.config
import AmbientAddons.Companion.mc
import com.ambientaddons.utils.Alignment
import com.ambientaddons.utils.render.OverlayUtils
-import com.ambientaddons.utils.SkyBlock
+import com.ambientaddons.utils.SBLocation
import com.ambientaddons.utils.dungeon.TextStyle
import net.minecraft.client.gui.ScaledResolution
import net.minecraftforge.client.event.ClientChatReceivedEvent
@@ -19,7 +19,7 @@ object WitherShieldOverlay {
@SubscribeEvent
fun onRenderOverlay(event: RenderGameOverlayEvent) {
if (event.type != RenderGameOverlayEvent.ElementType.TEXT) return
- if (!SkyBlock.inSkyblock || config.witherShieldDisplay == 0) return
+ if (!SBLocation.inSkyblock || config.witherShieldDisplay == 0) return
val diff = ((witherImpactEndTime - System.currentTimeMillis()) / 1000.0).takeIf { it >= 0 } ?: return
val display = ceil(diff).roundToInt().toString()
val resolution = ScaledResolution(mc)
@@ -31,7 +31,7 @@ object WitherShieldOverlay {
@SubscribeEvent
fun onChat(event: ClientChatReceivedEvent) {
- if (!SkyBlock.inSkyblock || config.witherShieldDisplay == 0) return
+ if (!SBLocation.inSkyblock || config.witherShieldDisplay == 0) return
if (event.type == 2.toByte() && event.message.unformattedText.contains("Wither Impact")) {
if (((witherImpactEndTime - System.currentTimeMillis()) / 1000.0) < 0) {
witherImpactEndTime = System.currentTimeMillis() + 5000