load correct minosoft meta version

That mostly fixes entity data in versions <1.13
This commit is contained in:
Moritz Zwerger 2023-11-26 20:41:49 +01:00
parent 593be2d925
commit e6ffbbf4b3
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -75,15 +75,18 @@ object MinosoftMeta {
for (entry in this) {
if (entry.version == "_") {
if (previous != null) continue
previous = entry
continue
}
val entryVersion = Versions[entry.version] ?: throw IllegalArgumentException("Unknown meta version ${entry.version}")
if (entryVersion > version) continue
if (previousVersion != null && previousVersion > entryVersion) {
continue
}
previousVersion = entryVersion
previous = entry
}
if (previous == null) return null