aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/textutil.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/textutil.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/textutil.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/textutil.kt b/src/main/kotlin/moe/nea/firmament/util/textutil.kt
index 2ed9af3..f811bd8 100644
--- a/src/main/kotlin/moe/nea/firmament/util/textutil.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/textutil.kt
@@ -6,9 +6,8 @@
package moe.nea.firmament.util
-import net.minecraft.text.LiteralTextContent
+import net.minecraft.text.PlainTextContent
import net.minecraft.text.Text
-import net.minecraft.text.TextContent
import net.minecraft.text.TranslatableTextContent
import moe.nea.firmament.Firmament
@@ -33,8 +32,7 @@ class TextMatcher(text: Text) {
state.offset = 0
state.currentText = firstOrNull
state.textContent = when (val content = firstOrNull.content) {
- is LiteralTextContent -> content.string
- TextContent.EMPTY -> ""
+ is PlainTextContent.Literal -> content.string
else -> {
Firmament.logger.warn("TextContent of type ${content.javaClass} not understood.")
return false