aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlmarsXd <ilmars500@gmail.com>2023-02-08 16:18:34 +0200
committerIlmarsXd <ilmars500@gmail.com>2023-02-08 16:18:34 +0200
commit05ca5ef3989f03ac4b9e5bacc959f9fe60cfbdcb (patch)
tree566ab34921cff526690d41071bb5da29fa1e853b
parent929e414c2db6de6d58af637d2b5f4dd3c5a90d9d (diff)
downloadDulkirMod-05ca5ef3989f03ac4b9e5bacc959f9fe60cfbdcb.tar.gz
DulkirMod-05ca5ef3989f03ac4b9e5bacc959f9fe60cfbdcb.tar.bz2
DulkirMod-05ca5ef3989f03ac4b9e5bacc959f9fe60cfbdcb.zip
use TextUtils for messages
-rw-r--r--src/main/kotlin/dulkirmod/features/ArachneTimer.kt11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/kotlin/dulkirmod/features/ArachneTimer.kt b/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
index 9089f5c..a4cfa1a 100644
--- a/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
+++ b/src/main/kotlin/dulkirmod/features/ArachneTimer.kt
@@ -1,11 +1,9 @@
package dulkirmod.features
-import dulkirmod.DulkirMod
-import dulkirmod.DulkirMod.Companion.mc
import dulkirmod.config.Config
+import dulkirmod.utils.TextUtils
import dulkirmod.utils.Utils
import dulkirmod.utils.WorldRenderUtils
-import net.minecraft.util.ChatComponentText
import net.minecraft.util.Vec3
import net.minecraftforge.client.event.ClientChatReceivedEvent
import net.minecraftforge.client.event.RenderWorldLastEvent
@@ -22,7 +20,7 @@ class ArachneTimer {
fun onChat(event: ClientChatReceivedEvent) {
if (!Config.arachneKillTimer) return
- var killtime: Float = -1f;
+ var killtime: Float = -1f
if (event.type == 2.toByte()) {
return
@@ -41,10 +39,7 @@ class ArachneTimer {
endmillis = System.currentTimeMillis()
if (startmillis > -1) {
killtime = (endmillis - startmillis).toFloat() / 1000
-
- mc.thePlayer.addChatMessage(
- ChatComponentText(" ${DulkirMod.CHAT_PREFIX} §6Arachne took §7$killtime §6seconds to kill.")
- )
+ TextUtils.info("§6Arachne took §7$killtime §6seconds to kill.")
}
}
}