- experimental change to height/temperature modifier
- more grasses on vanilla treeless biomes - CR biome type colours
This commit is contained in:
parent
e9b8e5f5d7
commit
018aa72a47
@ -146,9 +146,9 @@ public class Main extends Applet {
|
|||||||
{"Zoom: ", String.format("%.2f", controller.zoomLevel())},
|
{"Zoom: ", String.format("%.2f", controller.zoomLevel())},
|
||||||
{"Area: ", String.format("%sx%s [%sx%s]", blocks, blocks, resolution, resolution)},
|
{"Area: ", String.format("%sx%s [%sx%s]", blocks, blocks, resolution, resolution)},
|
||||||
{"Center: ", String.format("x=%.0f, y=%s, z=%.0f", offsetX, cache.getCenterHeight(), offsetZ)},
|
{"Center: ", String.format("x=%.0f, y=%s, z=%.0f", offsetX, cache.getCenterHeight(), offsetZ)},
|
||||||
{"Terrain: ", String.format("%s:%s", cache.getCenterTerrain().getName(),
|
{"Terrain: ", cache.getCenterTerrain().getName()},
|
||||||
cache.getCenterBiomeType().name())},
|
{"BiomeType:", cache.getCenterBiomeType().name()},
|
||||||
{"Biome: ", String.format("%s", biomeProvider.getBiome(cache.getCenterCell()).name)},
|
// {"Biome: ", String.format("%s", biomeProvider.getBiome(cache.getCenterCell()).name)},
|
||||||
{"Overlay: ", colorModeName()},
|
{"Overlay: ", colorModeName()},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,27 +1,23 @@
|
|||||||
package com.terraforged.core.world.climate;
|
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.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.GeneratorContext;
|
||||||
|
import com.terraforged.core.world.biome.BiomeType;
|
||||||
import com.terraforged.core.world.heightmap.WorldHeightmap;
|
import com.terraforged.core.world.heightmap.WorldHeightmap;
|
||||||
import com.terraforged.core.world.terrain.Terrain;
|
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 {
|
public class Climate {
|
||||||
|
|
||||||
private final float seaLevel;
|
private final float seaLevel;
|
||||||
private final float lowerHeight;
|
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 upperHeight = 0.75F;
|
||||||
|
|
||||||
private final float moistureModifier = 0.05F;
|
private final float moistureModifier = 0.1F;
|
||||||
private final float temperatureModifier = 0.175F;
|
private final float temperatureModifier = 0.05F;
|
||||||
|
|
||||||
private final Rand rand;
|
private final Rand rand;
|
||||||
private final Module treeLine;
|
private final Module treeLine;
|
||||||
@ -31,11 +27,6 @@ public class Climate {
|
|||||||
private final ClimateModule biomeNoise;
|
private final ClimateModule biomeNoise;
|
||||||
|
|
||||||
public Climate(GeneratorContext context, WorldHeightmap heightmap) {
|
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.biomeNoise = new ClimateModule(context.seed, context.settings.generator);
|
||||||
|
|
||||||
this.treeLine = Source.perlin(context.seed.next(), context.settings.generator.biome.biomeSize * 2, 1)
|
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);
|
biomeNoise.apply(cell, x, z, mask);
|
||||||
|
|
||||||
modifyTemp(cell, x, z);
|
modifyTemp(cell, x, z);
|
||||||
|
cell.biomeTemperature = cell.temperature;
|
||||||
|
|
||||||
|
BiomeType.apply(cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void modifyTemp(Cell<Terrain> cell, float x, float z) {
|
private void modifyTemp(Cell<Terrain> cell, float x, float z) {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
#TerraForged BiomeType Hex Colors (do not include hash/pound character)
|
#TerraForged BiomeType Hex Colors (do not include hash/pound character)
|
||||||
#Fri Jan 10 23:15:10 GMT 2020
|
#Fri Jan 10 23:15:10 GMT 2020
|
||||||
ALPINE=a078aa
|
ALPINE=4b7835
|
||||||
TAIGA=5b8f52
|
TAIGA=4b7835
|
||||||
TEMPERATE_RAINFOREST=0aa041
|
TEMPERATE_RAINFOREST=4b7835
|
||||||
TUNDRA=93a7ac
|
TUNDRA=ba9d47
|
||||||
TROPICAL_RAINFOREST=075330
|
TROPICAL_RAINFOREST=4aa73a
|
||||||
SAVANNA=97a527
|
SAVANNA=389a38
|
||||||
GRASSLAND=64dc3c
|
GRASSLAND=429545
|
||||||
TEMPERATE_FOREST=32c850
|
TEMPERATE_FOREST=456938
|
||||||
STEPPE=c8c878
|
STEPPE=c3aa61
|
||||||
DESERT=c87137
|
DESERT=e5d98f
|
||||||
COLD_STEPPE=afb496
|
COLD_STEPPE=a7a374
|
@ -1 +1 @@
|
|||||||
Subproject commit 5271ab24a768d5cefad117c911bae82615ad33f1
|
Subproject commit f841886915c246f55308cd07f746694acde57587
|
Loading…
Reference in New Issue
Block a user