{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiesoqof235zk4gdxartiwgax7cidlrwfl62iba7fuyvlzxy6ut4ea",
    "uri": "at://did:plc:pvz7ox4x2ehjiezsahttqyyz/app.bsky.feed.post/3mkbsg7d5bsa2"
  },
  "path": "/viewtopic.php?p=450730#p450730",
  "publishedAt": "2026-04-24T23:38:44.000Z",
  "site": "https://forum.luanti.org",
  "tags": [
    "Ghurir"
  ],
  "textContent": "I figured to use a single-node world, do my own terrain generation, and then call core.generate_decorations\nSee below an example:\n\nCode:\n\n\n    core.register_on_generated(function(minp, maxp, seed) local vm, emin, emax = core.get_mapgen_object(\"voxelmanip\") local area = VoxelArea:new({MinEdge = emin, MaxEdge = emax}) local data = vm:get_data() for z = minp.z, maxp.z do for x = minp.x, maxp.x do local h = get_height(x, z) for y = minp.y, maxp.y do local vi = area:index(x,y,z) data[vi] = stone if y > h then data[vi] = air elseif y == h then data[vi] = grass elseif y > h - 3 then data[vi] = dirt end end end end end vm:set_data(data) -- generate decoration and ores -- core.generate_ores(vm, minp, maxp) core.generate_decorations(vm, minp, maxp) -- Calculate lighting, write data, and update liquidsvm:calc_lighting()vm:write_to_map()vm:update_liquids()end)\n\nStatistics: Posted by Ghurir — Fri Apr 24, 2026 23:38\n\n* * *",
  "title": "Modding Discussion • Re: pass a heightmap to mapgen.",
  "updatedAt": "2026-04-24T23:38:44.000Z"
}