aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/util')
-rw-r--r--src/main/kotlin/util/TemplateUtil.kt3
-rw-r--r--src/main/kotlin/util/mc/CommonTextures.kt7
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"))
+}