From b21dec9a9a5d4f79813a32402702c9356622f03c Mon Sep 17 00:00:00 2001 From: dags- Date: Thu, 12 Mar 2020 12:45:50 +0000 Subject: [PATCH] - use a blue-y white for tundra - fix temp/moisture using inverse colouring - tweak how temp/moist scales with larger biome sizes --- .../terraforged/core/world/climate/ClimateModule.java | 9 +++++++-- .../java/com/terraforged/mod/gui/preview/RenderMode.java | 4 ++-- TerraForgedMod/src/main/resources/biomes.txt | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/TerraForgedCore/src/main/java/com/terraforged/core/world/climate/ClimateModule.java b/TerraForgedCore/src/main/java/com/terraforged/core/world/climate/ClimateModule.java index 9ccf18d..2b6ed48 100644 --- a/TerraForgedCore/src/main/java/com/terraforged/core/world/climate/ClimateModule.java +++ b/TerraForgedCore/src/main/java/com/terraforged/core/world/climate/ClimateModule.java @@ -53,9 +53,14 @@ public class ClimateModule { public ClimateModule(Seed seed, GeneratorSettings settings) { int biomeSize = settings.biome.biomeSize; + + // todo - better solution (reduces the amount that temp/moist grows with biome size) + int tempScaler = biomeSize > 500 ? 8 : 10; + int moistScaler = biomeSize > 500 ? 20 : 40; + float biomeFreq = 1F / biomeSize; - int moistureSize = 40 * biomeSize; - int temperatureSize = 10 * biomeSize; + int moistureSize = moistScaler * biomeSize; + int temperatureSize = tempScaler * tempScaler; int moistScale = NoiseUtil.round(moistureSize * biomeFreq); int tempScale = NoiseUtil.round(temperatureSize * biomeFreq); int warpScale = settings.biome.biomeWarpScale; diff --git a/TerraForgedMod/src/main/java/com/terraforged/mod/gui/preview/RenderMode.java b/TerraForgedMod/src/main/java/com/terraforged/mod/gui/preview/RenderMode.java index 3bb8caa..ab08380 100644 --- a/TerraForgedMod/src/main/java/com/terraforged/mod/gui/preview/RenderMode.java +++ b/TerraForgedMod/src/main/java/com/terraforged/mod/gui/preview/RenderMode.java @@ -65,9 +65,9 @@ public enum RenderMode { float[] hsb = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), new float[3]); return Color.getHSBColor(hsb[0], hsb[1], (hsb[2] * scale) + bias); case MOISTURE: - return Color.getHSBColor(step(1 - cell.moisture, 8) * 0.65F, saturation, brightness); + return Color.getHSBColor(step(cell.moisture, 8) * 0.65F, saturation, brightness); case TEMPERATURE: - return Color.getHSBColor(step(cell.temperature, 8) * 0.65F, saturation, brightness); + return Color.getHSBColor(step(1 - cell.temperature, 8) * 0.65F, saturation, brightness); default: return Color.black; } diff --git a/TerraForgedMod/src/main/resources/biomes.txt b/TerraForgedMod/src/main/resources/biomes.txt index 8abd632..b1b2021 100644 --- a/TerraForgedMod/src/main/resources/biomes.txt +++ b/TerraForgedMod/src/main/resources/biomes.txt @@ -3,7 +3,7 @@ ALPINE=4b7835 TAIGA=4b7835 TEMPERATE_RAINFOREST=3c602b -TUNDRA=ba9d47 +TUNDRA=f7fafc TROPICAL_RAINFOREST=4aa73a SAVANNA=389a38 GRASSLAND=429545