GeneratedBiome
A class in Root.Township, Alta.Caves.
The rolled result of a biome mix for a cave layer or area: the biomes and their weights, attributes and element chances, plus the two biomes it blends between.
- Listed in World generation
- Documented in Caves
Constructors
| Member | What it is |
|---|---|
GeneratedBiome(int seed, Biome from, Biome to, float transition, Dictionary<Biome, float> biomeWeightings, AttributeSet attributes, Dictionary<Element, float> elementChances) | Creates a GeneratedBiome from seed, from, to, transition, biomeWeightings, attributes and elementChances. |
Fields
2 private and internal fields
| Member | What it is |
|---|---|
private Biome[] biomes | The weighted biomes, in the same order as biomeThresholds. |
private float[] biomeThresholds | Running totals of the biome weightings, used by GetRandom to pick a biome. |
Properties
| Member | What it is |
|---|---|
AttributeSet Attributes { get; private set; } | The biome attribute values for this area. |
Dictionary<Biome, float> BiomeWeightings { get; private set; } | Weight of each biome in the mix. |
Dictionary<Element, float> ElementChances { get; private set; } | Chance of each element. |
Biome From { get; private set; } | The biome it transitions from. |
int Seed { get; private set; } | Seed used to roll it. |
Biome To { get; private set; } | The biome it transitions to, or null. |
float Transition { get; private set; } | How far between From and To it is. |
Methods
| Member | What it is |
|---|---|
static GeneratedBiome Basic(int seed, Biome biome) | Makes a result with a single biome at full weight. |
float GetDebugValue() | A number mixed from all values, for comparing two results when debugging. |
Biome GetRandom() | Picks a biome by weight. Assumes the weights add up to 1; anything past the total picks the first biome. |
Used in
Members of other types that take, return or hold a GeneratedBiome:
BiomeSerializer.SerializeBiome, CaveBiomeGenerator.Generate, CaveBiomeGenerator.Preview, CaveLayerManager.biomes, CaveLayerManager.GetBiome, GeneratingBiome.Generate, SerializedGeneratedBiome.GetGenerated, ChunkEnvironment.Biome, ChunkEnvironment.generatedBiome, Ecosystem.PopulationApplication.InitializeSample, BiomePreset.Biome, BiomePreset.generated, BiomeSphere.Generated, GenerationStarter.biome, GenerationStartSaveData.generatedBiome, HitSpawnData.HitSpawnData, SpawnData.Biome, SpawnData.SpawnData.