diff --git a/src/main/java/de/bixilon/minosoft/data/registries/biomes/Biome.kt b/src/main/java/de/bixilon/minosoft/data/registries/biomes/Biome.kt index f34bb23bf..d815f76af 100644 --- a/src/main/java/de/bixilon/minosoft/data/registries/biomes/Biome.kt +++ b/src/main/java/de/bixilon/minosoft/data/registries/biomes/Biome.kt @@ -28,11 +28,11 @@ data class Biome( override val identifier: ResourceLocation, val temperature: Float, val downfall: Float, - val skyColor: RGBColor?, + val skyColor: RGBColor? = null, val fogColor: RGBColor? = null, - val waterColor: RGBColor?, - val waterFogColor: RGBColor?, - val precipitation: BiomePrecipitation?, + val waterColor: RGBColor? = null, + val waterFogColor: RGBColor? = null, + val precipitation: BiomePrecipitation? = null, ) : RegistryItem() { val grassColorModifier = GrassColorModifiers.BIOME_MAP[identifier] val temperatureColorMapCoordinate = getColorMapCoordinate(temperature) diff --git a/src/test/java/de/bixilon/minosoft/data/registries/biomes/BiomeTest.kt b/src/test/java/de/bixilon/minosoft/data/registries/biomes/BiomeTest.kt new file mode 100644 index 000000000..58560be4b --- /dev/null +++ b/src/test/java/de/bixilon/minosoft/data/registries/biomes/BiomeTest.kt @@ -0,0 +1,27 @@ +/* + * Minosoft + * Copyright (C) 2020-2023 Moritz Zwerger + * + * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program. If not, see . + * + * This software is not affiliated with Mojang AB, the original developer of Minecraft. + */ + +package de.bixilon.minosoft.data.registries.biomes + +import de.bixilon.minosoft.data.registries.identified.Namespaces.minecraft +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test + +class BiomeTest { + + @Test + fun `color map index`() { + val biome = Biome(minecraft("plains"), temperature = 0.8f, downfall = 0.4f) + assertEquals(biome.colorMapPixelIndex, 44338) + } +}