diff options
author | inglettronald <inglettronald@gmail.com> | 2023-06-14 15:08:06 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-06-14 15:08:06 -0500 |
commit | 075a29a609a4133f7dc758170cb2f2a3d5ea854c (patch) | |
tree | 2866246d23e06b8c62974fe775548a56933fa0e6 /src/main/kotlin | |
parent | f712c6f7f7319a645077d7c700407a61fdc07e5d (diff) | |
download | DulkirMod-master.tar.gz DulkirMod-master.tar.bz2 DulkirMod-master.zip |
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/dulkirmod/features/BlazeSlayerFeatures.kt | 25 | ||||
-rw-r--r-- | src/main/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 } |