Table of Contents

Class TerrainWorld

Namespace
Valheim.Testing.Doubles
Assembly
Valheim.Testing.Doubles.dll

A WorldGenerator over the toolkit's composable terrain (ITerrain).

public class TerrainWorld : WorldGenerator
Inheritance
object
WorldGenerator
TerrainWorld

Constructors

TerrainWorld(ITerrain)

public TerrainWorld(ITerrain terrain)

Parameters

terrain ITerrain

Properties

Terrain

public ITerrain Terrain { get; }

Property Value

ITerrain

Methods

GetBiome(float, float, float, bool)

The biome at a point, with the game's signature and defaults. A test world overrides it; the double passes the game's ocean parameters through and does not model them.

public override Heightmap.Biome GetBiome(float x, float z, float oceanLevel = 0.02, bool waterAlwaysOcean = false)

Parameters

x float
z float
oceanLevel float
waterAlwaysOcean bool

Returns

Heightmap.Biome

GetHeight(float, float)

public override float GetHeight(float x, float z)

Parameters

x float
z float

Returns

float

GetRiverWeight(float, float, out float, out float)

public override void GetRiverWeight(float x, float z, out float weight, out float width)

Parameters

x float
z float
weight float
width float