Table of Contents

Class TerrainGenerator

Namespace
Shard.Gameplay.Universe.World
Assembly
Shard.Gameplay.Universe.dll
public sealed class TerrainGenerator
Inheritance
TerrainGenerator
Inherited Members

Constructors

TerrainGenerator(Density, ushort, ushort)

public TerrainGenerator(Density density, ushort fillBlock, ushort surfaceBlock)

Parameters

density Density
fillBlock ushort
surfaceBlock ushort

Methods

DefaultDensity(long, double, double)

A simple default terrain density: a fractal-noise surface around baseHeight ± amplitude. Solid below the surface, air above (surfaceHeight(x,z) - y).

public static Density DefaultDensity(long seed, double baseHeight = 64, double amplitude = 24)

Parameters

seed long
baseHeight double
amplitude double

Returns

Density

DensityAt(int, int, int)

Density at a world block position (> 0 is solid).

public double DensityAt(int worldX, int worldY, int worldZ)

Parameters

worldX int
worldY int
worldZ int

Returns

double

Generate(ChunkPos)

Generate one cubic chunk.

public BlockChunk Generate(ChunkPos position)

Parameters

position ChunkPos

Returns

BlockChunk