diff options
author | Linnea Gräf <nea@nea.moe> | 2024-08-09 00:49:36 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-08-09 02:20:41 +0200 |
commit | 1606188d9ad65c66e9d873497ea3271dbdadaf77 (patch) | |
tree | a33ea87c76bd672fe3902455742ba42ae8c91ee1 /src/main/kotlin/moe/nea/firmament/util/IdentifierSerializer.kt | |
parent | 2a023d0a8d4e9af1dff21ea1bc997dfa0c686b14 (diff) | |
download | firmament-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.kt | 4 |
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)) |