diff --git a/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/item/ItemStackHook.kt b/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/item/ItemStackHook.kt index 8ef80cea4..3a8f8ebe4 100644 --- a/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/item/ItemStackHook.kt +++ b/src/main/kotlin/gg/skytils/skytilsmod/mixins/hooks/item/ItemStackHook.kt @@ -27,7 +27,8 @@ import gg.skytils.skytilsmod.utils.ifNull import net.minecraft.item.ItemStack import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable -const val starPattern = "§6✪" +const val starPattern = "§6✪✪✪✪✪" +const val starPatternSingle = "✪" val masterStars = ('➊'..'➎').toList() val masterStarPattern = Regex("§c[${masterStars.joinToString("")}]") @@ -68,18 +69,18 @@ fun modifyDisplayName(s: String): String { .replace(masterStarPattern, "") }§c${count}✪" }.ifNull { - displayName = "${displayName.replace(starPattern, "")}§6${displayName.countMatches(starPattern)}✪" + displayName = "${displayName.replace(starPattern, "")}§6${displayName.countMatches(starPatternSingle)}✪" } } else if (Skytils.config.starDisplayType == 1) { masterStarPattern.find(displayName)?.let { val star = it.value.last() val count = masterStars.indexOf(star) + 1 displayName = displayName.replace(masterStarPattern, "") - .replaceFirst(starPattern.repeat(count), "§c✪".repeat(count)) + .replaceFirst("§6${starPatternSingle.repeat(count)}", "§c✪§6".repeat(count)) } } } } catch (ignored: Exception) { } return displayName -} \ No newline at end of file +}