Taos API Reference
    Preparing search index...

    Interface StructureDef

    A registered structure type.

    interface StructureDef {
        id: string;
        spacing: number;
        separation: number;
        salt: number;
        plan(
            originChunkX: number,
            originChunkZ: number,
            ctx: GenCtx,
            rng: Random,
        ): StructurePlan | null;
    }
    Index

    Properties

    Methods

    Properties

    id: string
    spacing: number

    Grid region size in chunks — one candidate structure per region.

    separation: number

    Jitter margin within a region in chunks (origin stays spacing - separation from the far edge).

    salt: number

    Decorrelates this structure's region grid from others.

    Methods

    • Decides and lays out a structure at a candidate origin chunk. Return null for "no structure here". Must be deterministic for a given (origin, ctx): it is recomputed by every chunk the structure overlaps.

      Parameters

      • originChunkX: number
      • originChunkZ: number
      • ctx: GenCtx
      • rng: Random

      Returns StructurePlan | null