diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/textutil.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/util/textutil.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/textutil.kt b/src/main/kotlin/moe/nea/firmament/util/textutil.kt index 5f9379a..38b7daf 100644 --- a/src/main/kotlin/moe/nea/firmament/util/textutil.kt +++ b/src/main/kotlin/moe/nea/firmament/util/textutil.kt @@ -9,6 +9,7 @@ package moe.nea.firmament.util import net.minecraft.text.MutableText import net.minecraft.text.PlainTextContent +import net.minecraft.text.Style import net.minecraft.text.Text import net.minecraft.text.TranslatableTextContent import net.minecraft.util.Formatting @@ -98,7 +99,7 @@ val Text.unformattedString: String get() = string.removeColorCodes() -fun MutableText.withColor(formatting: Formatting) = this.styled { it.withColor(formatting) } +fun MutableText.withColor(formatting: Formatting) = this.styled { it.withColor(formatting).withItalic(false) } fun Text.transformEachRecursively(function: (Text) -> Text): Text { val c = this.content |