mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 18:05:51 -04:00
biome: test color map index
This commit is contained in:
parent
f9d9325384
commit
4824fdda05
@ -28,11 +28,11 @@ data class Biome(
|
|||||||
override val identifier: ResourceLocation,
|
override val identifier: ResourceLocation,
|
||||||
val temperature: Float,
|
val temperature: Float,
|
||||||
val downfall: Float,
|
val downfall: Float,
|
||||||
val skyColor: RGBColor?,
|
val skyColor: RGBColor? = null,
|
||||||
val fogColor: RGBColor? = null,
|
val fogColor: RGBColor? = null,
|
||||||
val waterColor: RGBColor?,
|
val waterColor: RGBColor? = null,
|
||||||
val waterFogColor: RGBColor?,
|
val waterFogColor: RGBColor? = null,
|
||||||
val precipitation: BiomePrecipitation?,
|
val precipitation: BiomePrecipitation? = null,
|
||||||
) : RegistryItem() {
|
) : RegistryItem() {
|
||||||
val grassColorModifier = GrassColorModifiers.BIOME_MAP[identifier]
|
val grassColorModifier = GrassColorModifiers.BIOME_MAP[identifier]
|
||||||
val temperatureColorMapCoordinate = getColorMapCoordinate(temperature)
|
val temperatureColorMapCoordinate = getColorMapCoordinate(temperature)
|
||||||
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* 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)
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user