fix biome reading crash

This commit is contained in:
Moritz Zwerger 2023-10-11 20:30:49 +02:00
parent 9f253a386a
commit f61a1a8e93
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -70,7 +70,7 @@ data class Biome(
fogColor = fogColor,
waterColor = waterColor,
waterFogColor = waterFogColor,
precipitation = data["precipitation"]?.let { if (it is Int) BiomePrecipitation.getOrNull(it - 1) else BiomePrecipitation[it] },
precipitation = data["precipitation"]?.let { if (it is Int) BiomePrecipitation.getOrNull(it - 1) else if (it.toString().lowercase() == "none") null else BiomePrecipitation[it] },
)
}
}