blob: 79f6428a1916a485356bc07708f91a992227a9b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package com.ambientaddons.features.kuudra
import AmbientAddons.Companion.config
import com.ambientaddons.events.BossStatusEvent
import com.ambientaddons.gui.GuiElement
import com.ambientaddons.utils.Area
import com.ambientaddons.utils.Extensions.stripControlCodes
import com.ambientaddons.utils.SBLocation
import net.minecraft.entity.boss.BossStatus
import net.minecraftforge.client.event.ClientChatReceivedEvent
import net.minecraftforge.client.event.RenderGameOverlayEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
object KuudraHp {
fun onBossBarSet(event: BossStatusEvent) {
if (!config.kuudraHp || SBLocation.area != Area.Kuudra) return
val bossData = event.displayData
if (bossData.displayName.unformattedText.stripControlCodes().contains("Kuudra")) {
BossStatus.healthScale = bossData.health / bossData.maxHealth
BossStatus.statusBarTime = 100
BossStatus.bossName = "${bossData.displayName.formattedText} §r§8 - §r§d ${S}"
}
}
}
|