Class LayeredDumpTerrain
- Namespace
- Valheim.Testing
- Assembly
- Valheim.Testing.dll
Read-only composition of pinned native world dumps. Ordinary terrain facts use the finest containing grid; base height uses only the explicitly designated lattice, even where another finer grid contains the point. Equal-spacing grids may not overlap, including at an edge. Outside every containing layer, queries fail. Node values retain the CSV precision; between-node heights and river fields are bilinear approximations, while biomes use the selected grid's nearest node. Safe for concurrent readers after loading.
public sealed class LayeredDumpTerrain : ITerrain
- Inheritance
-
objectLayeredDumpTerrain
- Implements
Properties
BaseHeightLayer
The designated base-height lattice: the only layer GetBaseHeight(float, float) reads.
public GridDumpTerrain BaseHeightLayer { get; }
Property Value
Methods
GetBaseHeight(float, float)
Uses only the designated base-height lattice; never treats the finer ground-height grid as its source.
public float GetBaseHeight(float x, float z)
Parameters
xfloatzfloat
Returns
- float
GetBiome(float, float)
Returns the declared biome at horizontal x/z.
public TerrainBiome GetBiome(float x, float z)
Parameters
xfloatzfloat
Returns
GetHeight(float, float)
Returns ground height y in metres at horizontal x/z.
public float GetHeight(float x, float z)
Parameters
xfloatzfloat
Returns
- float
GetRiverWeight(float, float, out float, out float)
Returns the declared river weight and width; their interpretation belongs to the consuming mod.
public void GetRiverWeight(float x, float z, out float weight, out float width)
Parameters
xfloatzfloatweightfloatwidthfloat
LayerAt(float, float)
The finest layer containing the point: the grid that answers height, biome and river here. Its Provenance is the layer's name, and IsSampleNode(float, float) says whether the point is one of its exact CSV nodes rather than an interpolation.
public GridDumpTerrain LayerAt(float x, float z)
Parameters
xfloatzfloat
Returns
Load(IEnumerable<WorldDumpManifest>, string)
Verifies every manifest's file (Verify()) before composing them. Different world
IDs, seeds or game builds fail; overlap between layers of equal resolution is ambiguous and fails. At least one
layer is required, and baseHeightLayer must name one of them.
public static LayeredDumpTerrain Load(IEnumerable<WorldDumpManifest> layers, string baseHeightLayer)
Parameters
layersIEnumerable<WorldDumpManifest>baseHeightLayerstring