- experimental change to height/temperature modifier

- more grasses on vanilla treeless biomes
- CR biome type colours
This commit is contained in:
dags- 2020-01-20 17:19:53 +00:00
parent e9b8e5f5d7
commit 018aa72a47
4 changed files with 25 additions and 31 deletions

View File

@ -146,9 +146,9 @@ public class Main extends Applet {
{"Zoom: ", String.format("%.2f", controller.zoomLevel())},
{"Area: ", String.format("%sx%s [%sx%s]", blocks, blocks, resolution, resolution)},
{"Center: ", String.format("x=%.0f, y=%s, z=%.0f", offsetX, cache.getCenterHeight(), offsetZ)},
{"Terrain: ", String.format("%s:%s", cache.getCenterTerrain().getName(),
cache.getCenterBiomeType().name())},
{"Biome: ", String.format("%s", biomeProvider.getBiome(cache.getCenterCell()).name)},
{"Terrain: ", cache.getCenterTerrain().getName()},
{"BiomeType:", cache.getCenterBiomeType().name()},
// {"Biome: ", String.format("%s", biomeProvider.getBiome(cache.getCenterCell()).name)},
{"Overlay: ", colorModeName()},
};

View File

@ -1,27 +1,23 @@
package com.terraforged.core.world.climate;
import me.dags.noise.Module;
import me.dags.noise.Source;
import me.dags.noise.func.CellFunc;
import me.dags.noise.func.DistanceFunc;
import me.dags.noise.source.Rand;
import me.dags.noise.util.NoiseUtil;
import com.terraforged.core.cell.Cell;
import com.terraforged.core.module.CellLookup;
import com.terraforged.core.module.CellLookupOffset;
import com.terraforged.core.world.GeneratorContext;
import com.terraforged.core.world.biome.BiomeType;
import com.terraforged.core.world.heightmap.WorldHeightmap;
import com.terraforged.core.world.terrain.Terrain;
import me.dags.noise.Module;
import me.dags.noise.Source;
import me.dags.noise.source.Rand;
public class Climate {
private final float seaLevel;
private final float lowerHeight;
private final float midHeight = 0.425F;
private final float midHeight = 0.45F;
private final float upperHeight = 0.75F;
private final float moistureModifier = 0.05F;
private final float temperatureModifier = 0.175F;
private final float moistureModifier = 0.1F;
private final float temperatureModifier = 0.05F;
private final Rand rand;
private final Module treeLine;
@ -31,11 +27,6 @@ public class Climate {
private final ClimateModule biomeNoise;
public Climate(GeneratorContext context, WorldHeightmap heightmap) {
final int cellSeed = context.seed.next();
final int cellSize = context.settings.generator.biome.biomeSize;
final int warpScale = context.settings.generator.biome.biomeWarpScale;
final int warpStrength = context.settings.generator.biome.biomeWarpStrength;
this.biomeNoise = new ClimateModule(context.seed, context.settings.generator);
this.treeLine = Source.perlin(context.seed.next(), context.settings.generator.biome.biomeSize * 2, 1)
@ -68,6 +59,9 @@ public class Climate {
biomeNoise.apply(cell, x, z, mask);
modifyTemp(cell, x, z);
cell.biomeTemperature = cell.temperature;
BiomeType.apply(cell);
}
private void modifyTemp(Cell<Terrain> cell, float x, float z) {

View File

@ -1,13 +1,13 @@
#TerraForged BiomeType Hex Colors (do not include hash/pound character)
#Fri Jan 10 23:15:10 GMT 2020
ALPINE=a078aa
TAIGA=5b8f52
TEMPERATE_RAINFOREST=0aa041
TUNDRA=93a7ac
TROPICAL_RAINFOREST=075330
SAVANNA=97a527
GRASSLAND=64dc3c
TEMPERATE_FOREST=32c850
STEPPE=c8c878
DESERT=c87137
COLD_STEPPE=afb496
ALPINE=4b7835
TAIGA=4b7835
TEMPERATE_RAINFOREST=4b7835
TUNDRA=ba9d47
TROPICAL_RAINFOREST=4aa73a
SAVANNA=389a38
GRASSLAND=429545
TEMPERATE_FOREST=456938
STEPPE=c3aa61
DESERT=e5d98f
COLD_STEPPE=a7a374

@ -1 +1 @@
Subproject commit 5271ab24a768d5cefad117c911bae82615ad33f1
Subproject commit f841886915c246f55308cd07f746694acde57587