diff options
author | Linnea Gräf <nea@nea.moe> | 2024-10-14 00:07:21 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-10-14 00:07:21 +0200 |
commit | 854ec336cc6a0a3bb60f33acfac28ed45b491a15 (patch) | |
tree | 257e5a44f6cf2c4e12894a53dd6c99491f18f438 /src/main/kotlin/util | |
parent | a40c50b99186d425b3fcf42336940c29b97a8219 (diff) | |
download | firmament-854ec336cc6a0a3bb60f33acfac28ed45b491a15.tar.gz firmament-854ec336cc6a0a3bb60f33acfac28ed45b491a15.tar.bz2 firmament-854ec336cc6a0a3bb60f33acfac28ed45b491a15.zip |
Add /firm exporthotm to save hotm presets
Diffstat (limited to 'src/main/kotlin/util')
-rw-r--r-- | src/main/kotlin/util/TemplateUtil.kt | 3 | ||||
-rw-r--r-- | src/main/kotlin/util/mc/CommonTextures.kt | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/kotlin/util/TemplateUtil.kt b/src/main/kotlin/util/TemplateUtil.kt index 11100e9..f4ff37c 100644 --- a/src/main/kotlin/util/TemplateUtil.kt +++ b/src/main/kotlin/util/TemplateUtil.kt @@ -5,6 +5,7 @@ package moe.nea.firmament.util import java.util.* import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.json.Json import kotlinx.serialization.serializer import moe.nea.firmament.Firmament @@ -61,7 +62,7 @@ object TemplateUtil { fun <T> encodeTemplate(sharePrefix: String, data: T, serializer: SerializationStrategy<T>): String { require(sharePrefix.endsWith("/")) - return intoBase64Encoded(sharePrefix + Firmament.json.encodeToString(serializer, data)) + return intoBase64Encoded(sharePrefix + Firmament.tightJson.encodeToString(serializer, data)) } inline fun <reified T : Any> maybeDecodeTemplate(sharePrefix: String, data: String): T? = diff --git a/src/main/kotlin/util/mc/CommonTextures.kt b/src/main/kotlin/util/mc/CommonTextures.kt new file mode 100644 index 0000000..6b847df --- /dev/null +++ b/src/main/kotlin/util/mc/CommonTextures.kt @@ -0,0 +1,7 @@ +package moe.nea.firmament.util.mc + +import moe.nea.firmament.Firmament + +object CommonTextures { + fun genericWidget() = (Firmament.identifier("generic_vanilla_widget")) +} |