aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
index 9948695bb..6d93816b7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt
@@ -18,6 +18,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine
import at.hannibal2.skyhanni.utils.RenderUtils.drawColor
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
import at.hannibal2.skyhanni.utils.RenderUtils.exactLocation
+import at.hannibal2.skyhanni.utils.RenderUtils.exactPlayerEyeLocation
import at.hannibal2.skyhanni.utils.SoundUtils.playSound
import kotlinx.coroutines.*
import net.minecraft.client.Minecraft
@@ -127,8 +128,12 @@ object VampireSlayerFeatures {
if (shouldSendSound)
playTwinclawsSound()
if (shouldSendTitle)
- TitleUtils.sendTitle("§6§lTWINCLAWS", (1750 - config.twinclawsDelay), 2.6)
- nextClawSend = System.currentTimeMillis() + 5000
+ TitleUtils.sendTitle(
+ "§6§lTWINCLAWS",
+ (1750 - config.twinclawsDelay).milliseconds,
+ 2.6
+ )
+ nextClawSend = System.currentTimeMillis() + 5_000
}
}
}
@@ -178,7 +183,7 @@ object VampireSlayerFeatures {
else canUseSteak && configCoopBoss.steakAlert && containCoop
if (shouldSendSteakTitle)
- TitleUtils.sendTitle("§c§lSTEAK!", 300, 2.6)
+ TitleUtils.sendTitle("§c§lSTEAK!", 300.milliseconds, 2.6)
if (shouldRender) {
RenderLivingEntityHelper.setEntityColor(this, color) { isEnabled() }
@@ -278,10 +283,8 @@ object VampireSlayerFeatures {
val vec = event.exactLocation(it)
val distance = start.distance(vec)
if (distance <= 15) {
- val player = Minecraft.getMinecraft().thePlayer
- val add = if (player.isSneaking) LorenzVec(0.0, 1.54, 0.0) else LorenzVec(0.0, 1.62, 0.0)
event.draw3DLine(
- event.exactLocation(player).add(add),
+ event.exactPlayerEyeLocation(),
vec.add(0.0, 1.54, 0.0),
config.lineColor.toChromaColor(),
config.lineWidth,