aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/debug/ExportedTestConstantMeta.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-05-05 15:33:21 +0200
committerLinnea Gräf <nea@nea.moe>2025-05-05 15:33:21 +0200
commit38fd61fdcc70f75f5b8b5eb39e21c34aaf5ceb90 (patch)
treeb530b475da81a6b31814f96719b249e4e7136a6b /src/main/kotlin/features/debug/ExportedTestConstantMeta.kt
parent0a5a108b157762d251e547c08d206391177e4af9 (diff)
downloadFirmament-38fd61fdcc70f75f5b8b5eb39e21c34aaf5ceb90.tar.gz
Firmament-38fd61fdcc70f75f5b8b5eb39e21c34aaf5ceb90.tar.bz2
Firmament-38fd61fdcc70f75f5b8b5eb39e21c34aaf5ceb90.zip
fix(test): Unit Tests not DFUing itemsHEADmaster
Diffstat (limited to 'src/main/kotlin/features/debug/ExportedTestConstantMeta.kt')
-rw-r--r--src/main/kotlin/features/debug/ExportedTestConstantMeta.kt19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/kotlin/features/debug/ExportedTestConstantMeta.kt b/src/main/kotlin/features/debug/ExportedTestConstantMeta.kt
new file mode 100644
index 0000000..a817dd6
--- /dev/null
+++ b/src/main/kotlin/features/debug/ExportedTestConstantMeta.kt
@@ -0,0 +1,19 @@
+package moe.nea.firmament.features.debug
+
+import com.mojang.serialization.Codec
+import com.mojang.serialization.codecs.RecordCodecBuilder
+import java.util.Optional
+
+data class ExportedTestConstantMeta(
+ val dataVersion: Int,
+ val modVersion: Optional<String>,
+) {
+ companion object {
+ val CODEC: Codec<ExportedTestConstantMeta> = RecordCodecBuilder.create {
+ it.group(
+ Codec.INT.fieldOf("dataVersion").forGetter(ExportedTestConstantMeta::dataVersion),
+ Codec.STRING.optionalFieldOf("modVersion").forGetter(ExportedTestConstantMeta::modVersion),
+ ).apply(it, ::ExportedTestConstantMeta)
+ }
+ }
+}