World Generation
This guide covers custom world generation using Kore's Kotlin DSL. It maps common datapack JSON files to concise Kotlin builders.
What is World Generation?
World generation (worldgen) is the procedural generation process Minecraft uses to algorithmically generate terrain, biomes, features, and structures. Because there are over 18 quintillion (2⁶⁴) possible worlds, the game generates them using randomness, algorithms, and some manually built decorations.
The generation process uses gradient noise algorithms (like Perlin noise) to ensure terrain has both continuity and randomness. Multiple noise functions with different frequencies and amplitudes (called octaves) are combined to create natural-looking variation with hills, valleys, and other terrain features.
See World generation for the full technical breakdown.
Generation Steps
Minecraft generates chunks through multiple sequential steps. Incomplete chunks are called proto-chunks, while fully generated chunks accessible to players are level chunks:
- structures_starts - Calculate starting points for structure pieces
- structures_references - Store references to nearby structure starts
- biomes - Determine and store biomes (no terrain yet)
- noise - Generate base terrain shape and liquid bodies
- surface - Replace terrain surface with biome-dependent blocks
- carvers - Carve caves and canyons
- features - Place features, structures, and generate heightmaps
- light - Calculate light levels for all blocks
- spawn - Spawn initial mobs
- full - Generation complete, proto-chunk becomes level chunk
Reference: World generation steps
Documentation Structure
World generation is split into focused pages:
- Biomes - Climate, visuals, mob spawns, carvers, and feature lists
- Features - Configured and placed features (trees, ores, vegetation)
- Noise & Terrain - Density functions, noise definitions, and noise settings
- Dimensions - Dimensions and dimension types
- Structures - Structures, template pools, processors, and structure sets
- World Presets - World presets and flat level generator presets
Decoration Steps
Minecraft runs 11 decoration steps in order for each chunk; structures of a step place before features in that step.
| Step | Name | Examples |
|---|---|---|
| 1 | raw_generation |
Small end islands |
| 2 | lakes |
Lava lakes |
| 3 | local_modifications |
Geodes, icebergs |
| 4 | underground_structures |
Trial chambers, mineshafts |
| 5 | surface_structures |
Desert wells, blue ice patches |
| 6 | strongholds |
Unused (strongholds use surface_structures) |
| 7 | underground_ores |
Ore blobs, sand/gravel/clay disks |
| 8 | underground_decoration |
Infested blobs, nether gravel/blackstone |
| 9 | fluid_springs |
Water/lava springs |
| 10 | vegetal_decoration |
Trees, cacti, kelp, vegetation |
| 11 | top_layer_modification |
Freeze top layer |
Reference: Decoration steps
Output Paths
Kore APIs generate JSON under standard datapack directories (replace <ns> with your namespace):
| API | Output Path |
|---|---|
biome(...) |
data/<ns>/worldgen/biome/<name>.json |
configuredCarver(...) |
data/<ns>/worldgen/configured_carver/<name>.json |
configuredFeature(...) |
data/<ns>/worldgen/configured_feature/<name>.json |
densityFunction(...) |
data/<ns>/worldgen/density_function/<name>.json |
dimension(...) |
data/<ns>/dimension/<name>.json |
dimensionType(...) |
data/<ns>/dimension_type/<name>.json |
flatLevelGeneratorPreset(...) |
data/<ns>/worldgen/flat_level_generator_preset/<name>.json |
noise(...) |
data/<ns>/worldgen/noise/<name>.json |
noiseSettings(...) |
data/<ns>/worldgen/noise_settings/<name>.json |
processorList(...) |
data/<ns>/worldgen/processor_list/<name>.json |
structureSet(...) |
data/<ns>/worldgen/structure_set/<name>.json |
structures { ... } |
data/<ns>/worldgen/structure/<name>.json |
templatePool(...) |
data/<ns>/worldgen/template_pool/<name>.json |
worldPreset(...) |
data/<ns>/worldgen/world_preset/<name>.json |
Quick Start Example
Tips & Testing
-
In-game commands:
- Teleport:
/execute in <ns>:<dimension> run tp @s 0 200 0 - Locate:
/locate structure <ns>:<structure_name> - Reload:
/reload
- Teleport:
-
Validation: Check your configs against the Minecraft Wiki JSON schemas.
-
Performance: Keep feature counts and structure spacing reasonable.
-
Testing: Use GameTest for deterministic validation; see Test Features.
Cross-References
- Predicates - Condition logic for features
- Test Features - Automated validation with GameTest
