aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-08-09 00:49:36 +0200
committerLinnea Gräf <nea@nea.moe>2024-08-09 02:20:41 +0200
commit1606188d9ad65c66e9d873497ea3271dbdadaf77 (patch)
treea33ea87c76bd672fe3902455742ba42ae8c91ee1 /src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt
parent2a023d0a8d4e9af1dff21ea1bc997dfa0c686b14 (diff)
downloadfirmament-1606188d9ad65c66e9d873497ea3271dbdadaf77.tar.gz
firmament-1606188d9ad65c66e9d873497ea3271dbdadaf77.tar.bz2
firmament-1606188d9ad65c66e9d873497ea3271dbdadaf77.zip
Add custom block textures
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))