API reference Obsidian.API.World.Generator.DensityFunctions
FindTopSurface class
Scans down from FindTopSurface.UpperBound in steps of FindTopSurface.CellHeight and returns the first Y where FindTopSurface.Density is positive, or FindTopSurface.LowerBound if none is found.
public sealed class FindTopSurface : IDensityFunction, IRegistryResource
In Obsidian.API.
Constructors
public FindTopSurface();Properties
public required int CellHeight { get; init; }public required IDensityFunction Density { get; init; }public required int LowerBound { get; init; }public double MaxValue { get; }public double MinValue { get; }public string Type { get; }public required IDensityFunction UpperBound { get; init; }Methods
public double GetValue(double x, double y, double z);public IDensityFunction MapAll(IDensityFunctionVisitor visitor);