aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt b/src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt
index feea9e9..65c5b1c 100644
--- a/src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt
@@ -3,6 +3,8 @@ package moe.nea.firmament.util
import kotlinx.serialization.KSerializer
import kotlinx.serialization.builtins.serializer
+import kotlinx.serialization.descriptors.PrimitiveKind
+import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor
import kotlinx.serialization.descriptors.SerialDescriptor
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
@@ -11,7 +13,7 @@ import net.minecraft.util.Identifier
object IdentifierSerializer : KSerializer<Identifier> {
val delegateSerializer = String.serializer()
override val descriptor: SerialDescriptor
- get() = SerialDescriptor("Identifier", delegateSerializer.descriptor)
+ get() = PrimitiveSerialDescriptor("Identifier", PrimitiveKind.STRING)
override fun deserialize(decoder: Decoder): Identifier {
return Identifier.of(decoder.decodeSerializableValue(delegateSerializer))