ICustomSurfaceRule interface
A surface rule type a plugin adds, like a NeoForge mod's SurfaceRules.RuleSource: noise settings' surface rules name it in their type. Register it with IPluginRegistry.RegisterWorldgenType<ISurfaceRule, TRule>.
public interface ICustomSurfaceRule : ISurfaceRule, IRegistryResource
In Obsidian.API.
Remarks
Surface building calls ICustomSurfaceRule.Apply for many blocks of every chunk, on several threads at once, so keep it fast and don't change the rule's state in it.
Methods
Apply(ISurfaceContext)
IBlock Apply(ISurfaceContext context);The block the rule puts at the context's block.
Returns
The block, or null when the rule doesn't apply, so that the next rule of a sequence is tried.