mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -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 LILY_PAD_INVENTORY_COLOR = RGBColor("#71C35C")
|
||||
val LILY_PAD_BLOCK_COLOR = RGBColor("#208030")
|
||||
|
||||
const val COLORMAP_SIZE = 255
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class TintColorCalculator {
|
||||
fun calculateTint(tint: ResourceLocation, biome: Biome): RGBColor? {
|
||||
return when (tint) {
|
||||
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
|
||||
var color = if (colorMapPixelIndex > grassColorMap.size) {
|
||||
RenderConstants.GRASS_OUT_OF_BOUNDS_COLOR
|
||||
@ -42,12 +42,10 @@ class TintColorCalculator {
|
||||
}
|
||||
biome.grassColorModifier.modifier.invoke(color)
|
||||
}
|
||||
ResourceLocation("shearing_double_plant_tint") -> RGBColor("#456789")
|
||||
ResourceLocation("foliage_tint") -> {
|
||||
foliageColorMap[biome.downfallColorMapCoordinate shl 8 or biome.temperatureColorMapCoordinate]
|
||||
}
|
||||
ResourceLocation("sugar_cane_tint") -> RGBColor("#654321")
|
||||
ResourceLocation("lily_pad_tint") -> RGBColor("#987654")
|
||||
ResourceLocation("lily_pad_tint") -> RenderConstants.LILY_PAD_BLOCK_COLOR
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user