mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
rendering: tint: color lily pad, sugar canes, plants
This commit is contained in:
parent
d37b504288
commit
e215afb42b
@ -24,5 +24,8 @@ object RenderConstants {
|
|||||||
|
|
||||||
val GRASS_OUT_OF_BOUNDS_COLOR = RGBColor(-65281)
|
val GRASS_OUT_OF_BOUNDS_COLOR = RGBColor(-65281)
|
||||||
|
|
||||||
|
val LILY_PAD_INVENTORY_COLOR = RGBColor("#71C35C")
|
||||||
|
val LILY_PAD_BLOCK_COLOR = RGBColor("#208030")
|
||||||
|
|
||||||
const val COLORMAP_SIZE = 255
|
const val COLORMAP_SIZE = 255
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ class TintColorCalculator {
|
|||||||
fun calculateTint(tint: ResourceLocation, biome: Biome): RGBColor? {
|
fun calculateTint(tint: ResourceLocation, biome: Biome): RGBColor? {
|
||||||
return when (tint) {
|
return when (tint) {
|
||||||
ResourceLocation("water_tint") -> biome.waterColor
|
ResourceLocation("water_tint") -> biome.waterColor
|
||||||
ResourceLocation("grass_tint") -> {
|
ResourceLocation("grass_tint"), ResourceLocation("sugar_cane_tint"), ResourceLocation("shearing_double_plant_tint") -> {
|
||||||
val colorMapPixelIndex = biome.downfallColorMapCoordinate shl 8 or biome.temperatureColorMapCoordinate
|
val colorMapPixelIndex = biome.downfallColorMapCoordinate shl 8 or biome.temperatureColorMapCoordinate
|
||||||
var color = if (colorMapPixelIndex > grassColorMap.size) {
|
var color = if (colorMapPixelIndex > grassColorMap.size) {
|
||||||
RenderConstants.GRASS_OUT_OF_BOUNDS_COLOR
|
RenderConstants.GRASS_OUT_OF_BOUNDS_COLOR
|
||||||
@ -42,12 +42,10 @@ class TintColorCalculator {
|
|||||||
}
|
}
|
||||||
biome.grassColorModifier.modifier.invoke(color)
|
biome.grassColorModifier.modifier.invoke(color)
|
||||||
}
|
}
|
||||||
ResourceLocation("shearing_double_plant_tint") -> RGBColor("#456789")
|
|
||||||
ResourceLocation("foliage_tint") -> {
|
ResourceLocation("foliage_tint") -> {
|
||||||
foliageColorMap[biome.downfallColorMapCoordinate shl 8 or biome.temperatureColorMapCoordinate]
|
foliageColorMap[biome.downfallColorMapCoordinate shl 8 or biome.temperatureColorMapCoordinate]
|
||||||
}
|
}
|
||||||
ResourceLocation("sugar_cane_tint") -> RGBColor("#654321")
|
ResourceLocation("lily_pad_tint") -> RenderConstants.LILY_PAD_BLOCK_COLOR
|
||||||
ResourceLocation("lily_pad_tint") -> RGBColor("#987654")
|
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user