From 89d9d8b687b0b0e531ded27d72d6652247536aa6 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Sat, 9 Jul 2022 23:54:13 +0200 Subject: added debug log check for new year cake soul error --- src/main/java/at/lorenz/mod/ItemDisplayOverlayFeatures.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/lorenz') 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) + } } } -- cgit