Folds: blending, pre-generation and the fold pass
How the imported clusters meet the new ATM10 terrain (concept §3.4). The old terrain and ATM10's worldgen never line up; the seam becomes a fold (plateau, basin or tilted edge with cliffs, falls and overgrowth). This page covers the porter side (layers 1 and 2) and the hand-off to the in-game passes.
1. porter blend
Runs on the output of porter remap (or as part of porter all):
uv run porter blend --out <new world> [--width 1] [--min-section -4] [--max-section 20] [--pregen-margin 3]
| what | where | why |
|---|---|---|
Heightmaps removed, isLightOn: 0b, section SkyLight/BlockLight removed | every imported chunk | blocks changed in the remap; the game recomputes heightmaps and light on load |
blending_data: {min_section: -4, max_section: 20} | outer ring of each mask (--width chunks, Chebyshev distance to a chunk outside the mask) | vanilla old-chunk blending: freshly generated neighbours ease their terrain and biomes towards tagged chunks (only tagged chunks blend, MC-266343) |
blending_data removed | inner chunks | they never border new terrain |
| biomes | unchanged | already remapped to ATM10 biomes |
tinfoil/masks/<dim with ':' → '__'>.json | output world | {"dimension": "minecraft:overworld", "chunks": [[cx, cz], ...]}: the imported chunks, input of /tinfoil fold |
tinfoil/pregen.txt | output world | Chunky commands per cluster |
tinfoil/blend.json | output world | ring/chunk counts per dimension |
The section range −4…20 is the full 1.21 overworld height (y −64…319).
2. Import and pre-generation
Create the new world: same seed
-781762391954646974, normal level type, ATM10 + Tinfoil (concept §3.3). Don't fly around the base areas yet.Stop the server and copy the porter output into the world folder (
region/,entities/,poi/per dimension,playerdata/,stats/,advancements/,tinfoil/). The imported region files must not overwrite region files the game has already generated; if they do, import with MCA Selector (Import chunks, overwrite on) instead of copying files.Start the server and run the blocks of
tinfoil/pregen.txtin the console, one cluster at a time (wait for Chunky's "Task finished"). Each block generates a square around the cluster plus--pregen-marginchunks (default 3) of new terrain, so the fold pass has finished neighbours to work against:# overworld#1: 2021 chunks, blocks 9600..10767 x -608..159 chunky world minecraft:overworld chunky shape square chunky center 10184 -224 chunky radius 632 chunky startChunky skips chunks that already exist, so the imported chunks are only loaded (and upgraded by the DataFixer), never regenerated.
/tinfoil scancompares the loaded chunks withtinfoil/expected.json(porter report): unknown or air-replaced blocks must be 0.
3. Fold, falls and overgrowth passes (in the mod)
/tinfoil fold list | preview <mask> | apply <mask> | undo <mask> | status works on the masks the porter writes to <world>/tinfoil/masks/<name>.json ({"dimension", "chunks": [[cx, cz], ...]}). A job runs a few chunks per tick:
- Survey: terrain height per column (trees, plants, snow layers ignored) and its top block.
- Plan: the mask's border height is the median of nearby border columns (a tower on the edge doesn't count). Step ≤ 3: gentle blend. Larger: lip at base height, then terraced cliffs (a ledge per ~8 blocks of step) down (plateau) or up (basin) to the new terrain within the band (
[folds] bandWidth, default 32). The cliff line wobbles along the edge, never back up outwards. - Apply: raised ground is local stone with megalith-limestone strata every 6 blocks (Bermuda stone below y 0), 2 blocks of subsoil and the original surface block on top; carved ground keeps its surface block.
- Falls: on lips with ≥ 6 blocks drop, every ~100/
fallsPer100Blocksblocks of edge (min. 28 apart): a 2–5 wide water groove walled behind and at the ends pours over the edge; at the foot a pool dug one block into the ground (so it can't spill) with a Waterfall Mist block (spray, mist, glints by day). - Overgrowth: vines, signal moss (glowing, new) and glow lichen on cliff walls; moss carpet, ferns, azaleas and lilies on grassy tops and ledges (
overgrowthdensity); ruin pieces every ~ruinSpacingblocks where they fit entirely in the band. - Undo: every changed block's old state is saved per chunk in
<world>/tinfoil/fold-undo/<mask>/;undoputs them back. A re-run keeps the oldest snapshot.
Never writes inside the mask. Preview shows the cliff line with particles (end rods = plateau, soul flames = basin, green = gentle) for 30 s without changing anything.