Skip to main content

Overview

The features/ directory contains configuration files that determine how structures are placed in the world. Features control the distribution, location, and placement logic for everything from trees to ore veins.
Features define placement rules for structures. The actual structure files are stored in the structures/ directory.

Directory Structure

features/
├── boulders/
│   ├── boulders.yml
│   ├── granite_boulders.yml
│   ├── granite_boulders_canyon.yml
│   ├── mossy_boulders.yml
│   └── dripstone_caves_boulder_patches.yml
├── deposits/
│   ├── deposits/          # Dirt, gravel, andesite patches
│   └── ores/
│       └── veins/         # Ore vein generation
├── misc/
│   ├── travertine/        # Travertine formations
│   └── volcano/           # Volcano features
├── slabs/                 # Smooth terrain with slabs
├── vegetation/
│   ├── trees/
│   ├── flowers/
│   ├── bushes/
│   ├── coral/
│   ├── crops/
│   ├── dripleaf/
│   ├── sculk/
│   └── underwater/
└── rearth/                # Original Origen features

Feature Configuration Structure

Every feature config follows this basic structure:
id: FEATURE_ID
type: FEATURE

distributor:
  # Controls WHERE features attempt to spawn
  
locator:
  # Controls AT WHAT HEIGHT features spawn
  
structures:
  # Defines WHICH structures to place

Components

Distributors

Distributors determine the horizontal placement pattern for features.
Places features in a grid with random padding.
distributor:
  type: PADDED_GRID
  width: 8          # Grid cell size
  padding: 5        # Random padding (0 to this value)
  salt: 2315        # Random seed
Good for evenly distributed features like trees.
Uses noise to determine spawn chance at each location.
distributor:
  type: SAMPLER
  sampler:
    type: PROBABILITY
    sampler:
      type: OPEN_SIMPLEX_2
      salt: 8244
      frequency: 0.01
  threshold: 0.2    # Spawn if noise > threshold
Good for clustered or organic patterns.
Combines multiple distributors - all must pass.
distributor:
  type: AND
  distributors:
    - type: PADDED_GRID
      width: 8
      padding: 5
    - type: SAMPLER
      sampler:
        type: PROBABILITY
        sampler:
          type: OPEN_SIMPLEX_2
          frequency: 0.01
      threshold: 0.3
Useful for grid-based placement with noise variation.
Combines multiple distributors - any can pass.
distributor:
  type: OR
  distributors:
    - type: PADDED_GRID
      width: 16
    - type: SAMPLER
      threshold: 0.8

Locators

Locators determine the vertical position where features spawn.
Spawns on the terrain surface.
locator:
  type: SURFACE
  range:
    min: ${meta.yml:ocean-level}
    max: ${meta.yml:top-y}
Most common locator for surface features.
Spawns at heights matching a noise pattern.
locator:
  type: PATTERN
  pattern:
    type: OPEN_SIMPLEX_2
    frequency: 0.02
  range:
    min: -64
    max: 320
Good for cave features or scattered vertical placement.
Spawns at the highest solid block.
locator:
  type: TOP
  range:
    min: 0
    max: 320
Spawns on the ocean floor.
locator:
  type: UNDERWATER
  range:
    min: -64
    max: ${meta.yml:ocean-level}

Structure Selection

Defines which structures to place when feature spawns.
structures:
  distribution:
    type: CONSTANT      # Or WEIGHTED for multiple structures
  structures: tree_oak  # Single structure ID
For weighted selection:
structures:
  distribution:
    type: WEIGHTED
  structures:
    tree_oak: 3
    tree_birch: 2
    tree_spruce: 1

Feature Categories

Boulders

Boulders add large rock formations to terrain.
reference
/home/daytona/workspace/source/features/boulders/granite_boulders.yml
Full configuration:
id: GRANITE_BOULDERS
type: FEATURE

distributor:
  type: AND
  distributors:
    - type: PADDED_GRID
      width: 8
      padding: 5
      salt: 2315
    - type: SAMPLER
      sampler:
        type: PROBABILITY
        sampler:
          type: OPEN_SIMPLEX_2
          salt: 8244
          frequency: 0.01
      threshold: 0.2

locator:
  type: SURFACE
  range:
    min: ${meta.yml:ocean-level} + 3
    max: $meta.yml:top-y

structures:
  distribution:
    type: CONSTANT
  structures: granite_boulder
Available boulder types:
  • granite_boulders.yml
  • granite_boulders_canyon.yml - Variant for canyon biomes
  • mossy_boulders.yml
  • dripstone_caves_boulder_patches.yml

Vegetation

Vegetation features are organized by type:
Procedural and structure-based tree generation.
  • Large tree varieties (oak, spruce, jungle, etc.)
  • Procedural generation using Terra’s tree system
  • Custom structures for special trees (giant sakura, redwood)
  • Density controlled by biome configs
Small flower patches and individual flowers.
  • Distributed using sampler-based patterns
  • Different flower types per biome
  • Can generate as patches or individual plants
Berry bushes and decorative shrubs.
  • Sweet berry bushes
  • Decorative leaf clusters
  • Often combined with flower generation
Underwater coral formations.
  • Requires underwater locator
  • Various coral types and colors
  • Fan corals and brain corals
Kelp, seagrass, and other aquatic plants.
  • Kelp forests
  • Seagrass patches
  • Sea pickles

Deposits

Deposits include both decorative patches and ores.
Patches of alternate blocks in terrain.
  • Dirt patches
  • Gravel deposits
  • Andesite/diorite/granite patches
  • Clay deposits
Underground mineral generation.Located in features/deposits/ores/veins/:
  • Iron, gold, copper, coal
  • Diamond, emerald, lapis
  • Redstone and other minerals
  • Height ranges vary by ore type

Special Features

Travertine formations in specific biomes.Located in features/misc/travertine/:
  • Travertine cascades
  • Hot spring formations
  • Calcite deposits
Special volcano-related features.Located in features/misc/volcano/:
  • Lava pools
  • Volcanic vents
  • Obsidian formations
Smooth terrain transitions using slabs.Located in features/slabs/:
  • Places slabs on terrain to smooth transitions
  • Makes terrain look more natural
  • Applied in preprocessor stage

Rearth Features

Original Origen content in features/rearth/:
  • Dinosaur fossils
  • Giant sakura trees
  • Unique structures specific to Origen biomes

Generation Stages

Features are applied in stages defined in pack.yml:
stages:
  - id: global-preprocessors
    type: FEATURE
  - id: preprocessors
    type: FEATURE
  - id: landforms       # Boulders
    type: FEATURE
  - id: slabs           # Terrain smoothing
    type: FEATURE
  - id: ores
    type: FEATURE
  - id: deposits        # Dirt/gravel patches
    type: FEATURE
  - id: river-decoration
    type: FEATURE
  - id: trees
    type: FEATURE
  - id: underwater-flora
    type: FEATURE
  - id: flora           # Flowers, grass
    type: FEATURE
  - id: postprocessors  # Snow on trees
    type: FEATURE

Stage Assignment

Biomes assign features to stages in their config:
stages:
  trees:
    - id: OAK_TREES
      feature: features/vegetation/trees/oak_tree.yml
    - id: BIRCH_TREES
      feature: features/vegetation/trees/birch_tree.yml
  flora:
    - id: GRASS
      feature: features/vegetation/grass.yml
    - id: FLOWERS
      feature: features/vegetation/flowers/meadow_flowers.yml

Feature Configuration Tips

Density Control

Smaller width = more dense placement
distributor:
  type: PADDED_GRID
  width: 4    # Very dense
  width: 16   # Sparse
Higher threshold = less frequent placement
distributor:
  type: SAMPLER
  threshold: 0.1   # 10% spawn chance
  threshold: 0.9   # 90% spawn chance (very rare)
Use AND to make features rarer
distributor:
  type: AND
  distributors:
    - type: PADDED_GRID
      width: 8
    - type: SAMPLER
      threshold: 0.5  # Only 50% of grid positions

Height Ranges

# Surface features
range:
  min: ${meta.yml:ocean-level}
  max: ${meta.yml:top-y}

# Cave features
range:
  min: -64
  max: 40

# Deep underground
range:
  min: -64
  max: -32

Structure Variation

Use weighted structures for variety:
structures:
  distribution:
    type: WEIGHTED
  structures:
    common_variant: 5
    uncommon_variant: 2
    rare_variant: 1

Structures

Structure files that features place in the world

Math Functions

Noise samplers used in feature distribution

Configuration Overview

How features fit into the overall config structure

Build docs developers (and LLMs) love