Skip to content

Port ground features to chunk placers - #61

Open
macmv wants to merge 4 commits into
mainfrom
worktree-ground-chunk-placers
Open

macmv wants to merge 4 commits into
mainfrom
worktree-ground-chunk-placers

Conversation

@macmv

@macmv macmv commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Moves Splotch, Splatter, WaterResources, Pool, RiverSide and MossBoulder from placer to chunk_placer, and updates all biome call sites to g.place_chunk(...).
  • Splotch and WaterResources patches are seeded per source chunk, so they stay continuous across chunk borders. Pool, MossBoulder and RiverSide are kept inside one chunk.
  • BiomeBuilder::generate now gives each chunk placer an rng seeded from the world seed and the placer index (independent of earlier placers). This changes the random patterns of the existing chunk placers too.

Behavior differences

  • Round patches are now flat surface discs rather than 3D spheres.
  • WaterResources now patches the floor of any water up to 10 deep (the old version only fired when the shifted column was lower than the anchor), so avg_per_chunk may need retuning.
  • These run during base generation, before trees and other decoration, so e.g. podzol now exists before trees try to spawn.
  • Per-placer names are gone, so placer_enabled! toggles no longer apply to these; they fall under BiomeChunkPlacers.

LavaLake, Pillar and Monument are left as regular placers.

Testing

cargo check --workspace and cargo test -p rgen-placer -p rgen-biome pass. Not yet verified visually in a generated world.

Splotch, Splatter, WaterResources, Pool, RiverSide and MossBoulder are now
ChunkPlacers instead of Placers. Round patches use neighbor chunk seeds so
they stay continuous across borders; pools, boulders and riversides are kept
inside a single chunk.

Chunk placers now get an rng seeded from the world seed and placer index,
independent of earlier placers.
Spread is the block-above-the-ground counterpart of Splotch (used for mossy
carpet and flowers), so it uses the same neighbor-seeded blobs.
Clumps use neighbor-seeded random walks so they stay continuous across chunk
borders, and now follow the terrain surface instead of a single y level.
Scatter picks random columns in the chunk. Bushes stay inside one chunk.
PlantClumps was dead code and is removed.
The old placer picked a random y within +-4 of the anchor, so only 1 in 9
attempts landed on the surface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant