MC Worldgen

Procedural Minecraft Java region exporter. The C exporter is the maintained path: it builds without Python dependencies and writes .mca region files that can be copied into an existing world's region/ folder.

Requirements

  • GCC or Clang
  • make
  • zlib development headers (zlib1g-dev on Debian/Ubuntu)
  • pthreads, normally included with libc toolchains

Build

cd worldgen-c
make

Quick smoke test:

./bin/worldgen --radius 0 --out /tmp/mcworldgen-smoke

That should create /tmp/mcworldgen-smoke/r.0.0.mca.

Diagnostic feature scan:

make scan
./bin/worldgen-scan --radius 2 --center-x -3200 --center-z 3200

The scanner prints counts for cabin blocks, gravel/path columns, redwood biome columns, and titan-height tree trunks.

Generate Regions

Small area around chunk 0,0:

./bin/worldgen --radius 4 --trails --out output

Specific chunk rectangle:

./bin/worldgen --min-x -8 --max-x 8 --min-z -8 --max-z 8 --trails --out output

Useful options:

  • --radius N: generate chunks from center - N through center + N.
  • --center-x X --center-z Z: center chunk for radius mode.
  • --min-x --max-x --min-z --max-z: explicit chunk bounds.
  • --threads N: worker thread count.
  • --seed S: deterministic world seed.
  • --sea-level L: sea level, default 70.
  • --snow-line H: snow threshold, default sea-level + 38.
  • --trails: enable trail and cabin prepass.
  • --wall: build a brutalist border wall around the generated area.
  • --format mca|bin: write Minecraft region files or raw debug chunks.
  • --out DIR: output directory.

Features

  • Redwoods are enabled automatically. The biome classifier marks high-rainfall, higher-relief areas as redwood forest, then places titan trees, dirt/mulch floor cover, tall grass, and occasional fallen logs.
  • General forests grow as broad, coherent oak, maple, birch, pine, spruce, walnut, and cypress stands with occasional companion species. Seeded clearings, sparse field trees, regenerating edges, mature interiors, variable tree height, and irregular crown spacing keep the distribution from resolving into a uniform grid.
  • Cabins are enabled automatically. With --trails, cabins only try to spawn on chunks crossed by the trail network so their spur paths can connect to roads. Without --trails, cabins can still spawn, but they are rarer and unconnected.
  • Cabin generation includes compact homesteads, longhouses, two-story houses, L-shaped cabins, cross-gabled lodges, mixed-height tower lodges, and rambling multi-wing cabins. Roof direction, wing height, material palette, windows, porches, chimneys, decay, and path width vary by design.
  • Seeded woodland-community regions raise the local cabin frequency and give their roads permission to bridge narrowly bounded water at exact sea level. Eligible crossings must have nearby dry banks on both sides; deep water, broad lakes, and open ocean remain impassable. Bridges use raised spruce decks, timber supports, and intermittent edge posts rather than gravel fill.
  • Trails are optional because they need a prepass over the target area. Use --trails when you want roads and better-connected cabins.
  • Long roads search a broad terrain corridor and prefer valley floors, gentle contour-following grades, low ridge crossings, and stable side slopes. Deep water remains impassable; shallow water is crossed only when the detour cost is greater, keeping fords and causeways short. Short cabin spurs use looser engineering constraints so they can still reach the main network.

Minecraft Version

The exporter writes Java Edition 1.17.1 chunk data (DataVersion 2730). That version is chosen because the generator includes copper ore. Open the generated regions in Minecraft Java 1.17.1 or a newer version that can upgrade old worlds.

The exporter writes region files only. To use them in game, create or choose a Java world, close Minecraft, back up the save, and replace or add files under:

<minecraft save>/region/

Python Exporter

export_mca.py is the older prototype exporter. It now shares the same 1.17.1 data version and maps generated coal correctly, but the C exporter is faster and has the current terrain features.

Description
No description provided
Readme 3.7 MiB
Languages
C 84.2%
Python 15.6%
Makefile 0.2%