import type { Chunk } from '../core/index.js'; import { BlockPos, BlockState, Holder, HolderSet, Identifier } from '../core/index.js'; import type { PositionalRandom } from '../math/index.js'; import { DensityFunction } from './DensityFunction.js'; import type { NoiseChunk } from './NoiseChunk.js'; import type { RandomState } from './RandomState.js'; import type { WorldgenContext } from './VerticalAnchor.js'; import { VerticalAnchor } from './VerticalAnchor.js'; export declare class MaterialSystem { private readonly randomState; private readonly defaultBlock; private readonly seaLevel; private readonly preliminarySurface; private readonly random; private readonly surfaceNoise; private readonly surfaceSecondaryNoise; constructor(randomState: RandomState, defaultBlock: BlockState, seaLevel: number, preliminarySurface: DensityFunction, random: PositionalRandom); buildSurface(chunk: Chunk, noiseChunk: NoiseChunk, sourceRule: MaterialRule, worldgenContext: WorldgenContext, biomeGetter: (pos: BlockPos) => Identifier): void; getSurfaceDepth(x: number, z: number): number; getSurfaceSecondary(x: number, z: number): number; getOrCreateRandom(name: Identifier): PositionalRandom; } export declare class MaterialRuleContext { readonly system: MaterialSystem; readonly randomState: RandomState; readonly chunk: Chunk; readonly noiseChunk: NoiseChunk; readonly context: WorldgenContext; private readonly biomeGetter; blockX: number; blockY: number; blockZ: number; stoneDepthAbove: number; stoneDepthBelow: number; surfaceDepth: number; waterHeight: number; lastUpdateXZ: number; lastUpdateY: number; private lastSurfaceDepth2Update; private surfaceSecondary; private lastMinSurfaceLevelUpdate; private minSurfaceLevel; private biome; private readonly noiseSamplers2d; private readonly noiseSamplers3d; constructor(system: MaterialSystem, randomState: RandomState, chunk: Chunk, noiseChunk: NoiseChunk, context: WorldgenContext, biomeGetter: (pos: BlockPos) => Identifier); updateXZ(x: number, z: number): void; updateY(stoneDepthAbove: number, stoneDepthBelow: number, waterHeight: number, y: number): void; getSurfaceSecondary(): number; getMinSurfaceLevel(): number; getBiome(): Identifier; resolveAnchorY(anchor: VerticalAnchor): number; getNoiseSampler(noiseId: Identifier, is3d: boolean): () => number; private createNoiseSampler2d; private createNoiseSampler3d; } export declare type RuleEvaluator = (x: number, y: number, z: number) => BlockState | undefined; export declare abstract class MaterialRule { abstract compile(context: MaterialRuleContext): RuleEvaluator; } export declare namespace MaterialRule { const NOOP: MaterialRule; function fromJson(obj: unknown): MaterialRule; class HolderHolder extends MaterialRule { private readonly holder; constructor(holder: Holder); compile(context: MaterialRuleContext): RuleEvaluator; } class Block extends MaterialRule { private readonly resultState; constructor(resultState: BlockState); compile(context: MaterialRuleContext): RuleEvaluator; } class Sequence extends MaterialRule { private readonly sequence; constructor(sequence: MaterialRule[]); compile(context: MaterialRuleContext): RuleEvaluator; } class Condition extends MaterialRule { private readonly ifTrue; private readonly thenRun; constructor(ifTrue: MaterialCondition, thenRun: MaterialRule); compile(context: MaterialRuleContext): RuleEvaluator; } } export declare type ConditionEvaluator = () => boolean; export declare abstract class MaterialCondition { abstract compile(context: MaterialRuleContext): ConditionEvaluator; } export declare namespace MaterialCondition { const ALWAYS_FALSE: MaterialCondition; const ALWAYS_TRUE: MaterialCondition; function fromJson(obj: unknown): MaterialCondition; class HolderHolder extends MaterialCondition { private readonly holder; constructor(holder: Holder); compile(context: MaterialRuleContext): ConditionEvaluator; } class AbovePreliminarySurface extends MaterialCondition { compile(context: MaterialRuleContext): ConditionEvaluator; } class Biome extends MaterialCondition { private readonly biomes; constructor(biomes: Holder>); compile(context: MaterialRuleContext): ConditionEvaluator; } class NoiseThreshold extends MaterialCondition { private readonly noise; private readonly minThreshold; private readonly maxThreshold; private readonly is3d; constructor(noise: Identifier, minThreshold: number, maxThreshold: number, is3d: boolean); compile(context: MaterialRuleContext): ConditionEvaluator; } class Not extends MaterialCondition { private readonly invert; constructor(invert: MaterialCondition); compile(context: MaterialRuleContext): ConditionEvaluator; } class StoneDepth extends MaterialCondition { private readonly offset; private readonly addSurfaceDepth; private readonly secondaryDepthRange; private readonly ceiling; constructor(offset: number, addSurfaceDepth: boolean, secondaryDepthRange: number, ceiling: boolean); compile(context: MaterialRuleContext): ConditionEvaluator; } class VerticalGradient extends MaterialCondition { private readonly randomName; private readonly trueAtAndBelow; private readonly falseAtAndAbove; constructor(randomName: Identifier, trueAtAndBelow: VerticalAnchor, falseAtAndAbove: VerticalAnchor); compile(context: MaterialRuleContext): ConditionEvaluator; } class Water extends MaterialCondition { private readonly offset; private readonly surfaceDepthMultiplier; private readonly addStoneDepth; constructor(offset: number, surfaceDepthMultiplier: number, addStoneDepth: boolean); compile(context: MaterialRuleContext): ConditionEvaluator; } class YAbove extends MaterialCondition { private readonly anchor; private readonly surfaceDepthMultiplier; private readonly addStoneDepth; constructor(anchor: VerticalAnchor, surfaceDepthMultiplier: number, addStoneDepth: boolean); compile(context: MaterialRuleContext): ConditionEvaluator; } } //# sourceMappingURL=MaterialSystem.d.ts.map