aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/textutil.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-07-24 02:22:30 +0200
committerLinnea Gräf <nea@nea.moe>2024-07-24 02:22:30 +0200
commitc7143936d7a1bf3ae49362049541b2d23b11ab8c (patch)
tree4e905377b8abf56d1a9e253543a6d3a251f9da82 /src/main/kotlin/moe/nea/firmament/util/textutil.kt
parent4585a11434f44fa0900351825eb3ca38ce64f187 (diff)
downloadfirmament-c7143936d7a1bf3ae49362049541b2d23b11ab8c.tar.gz
firmament-c7143936d7a1bf3ae49362049541b2d23b11ab8c.tar.bz2
firmament-c7143936d7a1bf3ae49362049541b2d23b11ab8c.zip
Add essence upgrade recipes
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/textutil.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/textutil.kt3
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