ISurfaceContext interface
The block a surface rule is evaluated for, like vanilla's SurfaceRules.Context: surface building walks each column of a chunk down from its surface and evaluates the noise settings' rule for every block of the default block (usually stone) it finds.
public interface ISurfaceContext
In Obsidian.API.
Remarks
A context is reused for the next block, so don't keep it, or values read from it, past the call.
Properties
Biome
string Biome { get; }The biome at the block, like minecraft:plains.
int BlockX { get; }int BlockY { get; }int BlockZ { get; }MinSurfaceLevel
int MinSurfaceLevel { get; }The lowest Y above the noise's preliminary surface, as vanilla's minecraft:above_preliminary_surface condition tests.
Steep
bool Steep { get; }Whether the terrain rises steeply around the column, as vanilla's minecraft:steep condition tests.
StoneDepthAbove
int StoneDepthAbove { get; }How many blocks of the default block are above this one, itself included, up to air or a fluid.
StoneDepthBelow
int StoneDepthBelow { get; }How many blocks of the default block are below this one, itself included, down to air or a fluid.
SurfaceDepth
int SurfaceDepth { get; }The column's surface depth, from the surface noise: how deep surface blocks like dirt go (vanilla's 3 to 6).
WaterHeight
int WaterHeight { get; }The Y above the top of the fluid over this block, or Int32.MinValue when there's none.
Methods
Apply(ISurfaceRule)
IBlock Apply(ISurfaceRule rule);Evaluates another rule, such as one of a plugin rule's properties, for this block.
Returns
The block it gives, or null when it doesn't apply.
Test(ISurfaceCondition)
bool Test(ISurfaceCondition condition);Tests another condition, such as one of a plugin rule's properties, for this block.