mappings: dimensions check for 3d biome support

This commit is contained in:
Bixilon 2021-03-24 18:01:52 +01:00
parent 7fcb4ad835
commit c31115b858
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 3 additions and 2 deletions

View File

@ -34,6 +34,7 @@ data class Dimension(
val hasCeiling: Boolean = false,
val ultrawarm: Boolean = false,
val height: Int = 256,
val supports3DBiomes: Boolean = true,
) : RegistryItem {
val lowestSection = if (minY < 0) {
(minY + 1) / ProtocolDefinition.SECTION_HEIGHT_Y - 1
@ -46,8 +47,6 @@ data class Dimension(
height / ProtocolDefinition.SECTION_HEIGHT_Y
}
val supports3DBiomes = resourceLocation.full != "minecraft:overworld" // ToDo
override fun toString(): String {
return resourceLocation.toString()
}
@ -110,6 +109,7 @@ data class Dimension(
hasCeiling = data.get("has_ceiling")?.asBoolean == true,
ultrawarm = data.get("ultrawarm")?.asBoolean == true,
height = data.get("height")?.asInt ?: 256,
supports3DBiomes = data.get("supports_3d_biomes")?.asBoolean ?: !resourceLocation.full.contains("overworld")
)
}
}

View File

@ -45,6 +45,7 @@ class HUDSystemDebugElement(hudRenderer: HUDRenderer) : DebugScreen(hudRenderer)
init {
text()
text(
if (GitInfo.IS_INITIALIZED) {
"Commit: ${GitInfo.GIT_COMMIT_ID_DESCRIBE}: ${GitInfo.GIT_COMMIT_MESSAGE_SHORT}"