aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/dulkirmod/features/BlazeSlayerFeatures.kt25
-rw-r--r--src/main/kotlin/dulkirmod/features/ReaperDisplay.kt2
2 files changed, 14 insertions, 13 deletions
diff --git a/src/main/kotlin/dulkirmod/features/BlazeSlayerFeatures.kt b/src/main/kotlin/dulkirmod/features/BlazeSlayerFeatures.kt
index 48cddb8..7375b24 100644
--- a/src/main/kotlin/dulkirmod/features/BlazeSlayerFeatures.kt
+++ b/src/main/kotlin/dulkirmod/features/BlazeSlayerFeatures.kt
@@ -29,18 +29,19 @@ object BlazeSlayerFeatures {
if (event.entity is EntityArmorStand && event.entity.hasCustomName()) {
val name = Utils.stripColorCodes(event.entity.customNameTag)
val (x, y, z) = WorldRenderUtils.fixRenderPos(event.x, event.y, event.z)
- val color = phaseColors.firstOrNull { name.contains(it.first) }?.second ?: return
- WorldRenderUtils.drawCustomBox(
- x - 0.5,
- 1.0,
- y - 2,
- 1.5,
- z - 0.5,
- 1.0,
- color,
- 3f,
- phase = false
- )
+ val color = phaseColors.firstOrNull { name.contains(it.first) }?.second
+ if (color != null)
+ WorldRenderUtils.drawCustomBox(
+ x - 0.5,
+ 1.0,
+ y - 2,
+ 1.5,
+ z - 0.5,
+ 1.0,
+ color,
+ 3f,
+ phase = false
+ )
}
}
diff --git a/src/main/kotlin/dulkirmod/features/ReaperDisplay.kt b/src/main/kotlin/dulkirmod/features/ReaperDisplay.kt
index 3fd743d..f398ca2 100644
--- a/src/main/kotlin/dulkirmod/features/ReaperDisplay.kt
+++ b/src/main/kotlin/dulkirmod/features/ReaperDisplay.kt
@@ -32,7 +32,7 @@ object ReaperDisplay {
}
@SubscribeEvent
- fun onWorldLoad(event: WorldEvent) {
+ fun onWorldLoad(event: WorldEvent.Load) {
lastReaperUsage = 0L
}