diff options
author | Linnea Gräf <nea@nea.moe> | 2025-06-22 19:28:51 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-06-22 19:28:51 +0200 |
commit | 9bdbf28a58b45a50d0a1f4fb4c3fbcb318bcbcb0 (patch) | |
tree | 7c392eb435be8ddc8975cae2df4e89e0ab677279 /src/main/kotlin/features/debug/ExportedTestConstantMeta.kt | |
parent | 6fbdeb105a74aa77dcba4bd353575c24cb919485 (diff) | |
download | Firmament-9bdbf28a58b45a50d0a1f4fb4c3fbcb318bcbcb0.tar.gz Firmament-9bdbf28a58b45a50d0a1f4fb4c3fbcb318bcbcb0.tar.bz2 Firmament-9bdbf28a58b45a50d0a1f4fb4c3fbcb318bcbcb0.zip |
feat: Add overlay item exporter
Diffstat (limited to 'src/main/kotlin/features/debug/ExportedTestConstantMeta.kt')
-rw-r--r-- | src/main/kotlin/features/debug/ExportedTestConstantMeta.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/kotlin/features/debug/ExportedTestConstantMeta.kt b/src/main/kotlin/features/debug/ExportedTestConstantMeta.kt index a817dd6..f0250dc 100644 --- a/src/main/kotlin/features/debug/ExportedTestConstantMeta.kt +++ b/src/main/kotlin/features/debug/ExportedTestConstantMeta.kt @@ -3,17 +3,25 @@ package moe.nea.firmament.features.debug import com.mojang.serialization.Codec import com.mojang.serialization.codecs.RecordCodecBuilder import java.util.Optional +import net.minecraft.SharedConstants +import moe.nea.firmament.Firmament data class ExportedTestConstantMeta( val dataVersion: Int, val modVersion: Optional<String>, ) { companion object { + val current = ExportedTestConstantMeta( + SharedConstants.getGameVersion().saveVersion.id, + Optional.of("Firmament ${Firmament.version.friendlyString}") + ) + 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) } + val SOURCE_CODEC = CODEC.fieldOf("source").codec() } } |