Custom world becomes only ocean
✅ Reproduced failure WorldBox 0.51.2
Symptom
Section titled “Symptom”A custom New World preset starts generation successfully, but the generated map is essentially all ocean.
The UI works. The preset click is detected. No obvious crash occurs.
TerraForge cause
Section titled “TerraForge cause”TerraForge 0.0.16 expected its custom terrain pass to run when WorldBox performed the first Height / Perlin stage.
In the tested generation route, that callback never happened.
The log showed:
- TerraForge preset click detected;
- generation began;
- runtime map dimensions were available;
- WorldBox proceeded toward tile generation;
- zero expected Height / Perlin passes were observed;
- TerraForge handed control back without ever writing its custom heightmap.
The result was ocean.
Why this bug was deceptive
Section titled “Why this bug was deceptive”Most of the surrounding system was working:
- custom UI injection;
- preset activation;
- map creation;
- runtime dimension detection;
- WorldBox’s later biome/resource pipeline.
The failure was only one missing assumption:
the callback we expected to receive was not guaranteed to run on that generation route.
Fix used in TerraForge 0.0.17
Section titled “Fix used in TerraForge 0.0.17”TerraForge added a direct pre-tile fallback:
- prefer the normal Height / Perlin route when it exists;
- if WorldBox reaches tile conversion with zero custom height passes;
- locate the active runtime
WorldTile[,]; - write the TerraForge heightmap directly to
WorldTile.Height; - let vanilla tile conversion, biomes, vegetation, and resources continue.
The next test produced actual custom land instead of an all-ocean world.
Debugging checklist
Section titled “Debugging checklist”When a custom generator creates only ocean, verify separately:
- Did the preset activate?
- Did your generation handler actually execute?
- Did it receive the real runtime map dimensions?
- Did it write to the real terrain height storage?
- Did the expected vanilla callback actually occur?
- Did tile conversion run after your write?
Do not treat “no exception” as proof that your generation pass executed.