diff options
Diffstat (limited to 'src/main/kotlin/dulkirmod/features/BlazeSlayerFeatures.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/features/BlazeSlayerFeatures.kt | 25 |
1 files changed, 13 insertions, 12 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 + ) } } |