fix world preparing NullPointerException

This commit is contained in:
Bixilon 2021-04-02 18:42:35 +02:00
parent d0f063bfec
commit 6f74c7cfd0
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -75,9 +75,10 @@ class WorldRenderer(
}
val biome = world.getBiome(blockPosition)!!
val biome = world.getBiome(blockPosition)
val tintColor: RGBColor? = when {
biome == null -> null
StaticConfiguration.BIOME_DEBUG_MODE -> RGBColor(biome.hashCode())
blockInfo.tintColor != null -> blockInfo.tintColor
blockInfo.owner.tint != null -> renderWindow.tintColorCalculator.calculateTint(blockInfo.owner.tint, biome, blockPosition)