aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-09 23:54:13 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-09 23:54:13 +0200
commit89d9d8b687b0b0e531ded27d72d6652247536aa6 (patch)
tree637c9a3a086a6824ae690fe1e3850d85dd9e25c2 /src/main
parentcb2cb6db85ec1fc4b724d7f5248d79c2e20b8edf (diff)
downloadskyhanni-89d9d8b687b0b0e531ded27d72d6652247536aa6.tar.gz
skyhanni-89d9d8b687b0b0e531ded27d72d6652247536aa6.tar.bz2
skyhanni-89d9d8b687b0b0e531ded27d72d6652247536aa6.zip
added debug log check for new year cake soul error
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt b/src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt
index cc41d7f6e..00b81f3ee 100644
--- a/src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt
+++ b/src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt
@@ -74,7 +74,13 @@ class ItemDisplayOverlayFeatures {
if (LorenzMod.feature.item.displayNewYearCakeNumber) {
if (name.startsWith("New Year Cake")) {
- return "§b" + name.between("(Year ", ")")
+ try {
+ return "§b" + name.between("(Year ", ")")
+ } catch (e: IndexOutOfBoundsException) {
+ val message = "New Year Cake error in string: '$name': ${e.message}"
+ LorenzDebug.log(message)
+ LorenzUtils.error(message)
+ }
}
}