From 075a29a609a4133f7dc758170cb2f2a3d5ea854c Mon Sep 17 00:00:00 2001 From: inglettronald Date: Wed, 14 Jun 2023 15:08:06 -0500 Subject: bug fixes! --- .../dulkirmod/features/BlazeSlayerFeatures.kt | 25 +++++++++++----------- .../kotlin/dulkirmod/features/ReaperDisplay.kt | 2 +- 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 } -- cgit