thanks!!!
like:
if y > 0 then --above ground
data[area:index(x, y, z)] = c_air
else -- doing the ground
--handle -x and -z be snow, etc - depth will be unlimited
if x<0 and z<0 and y<0 then
data[area:index(x, y, z)] = c_stone
end
if x>=0 and z<0 and y<0 then
data[area:index(x, y, z)] = c_sand
end
if x<0 and z>=0 and y<0 then
data[area:index(x, y, z)] = c_water
end
if x>=0 and z>=0 and y<0 then
data[area:index(x, y, z)] = c_dirt
end
end --if the air
one area is like 80*80*80 nodes - whew! no wonder they write it in c!
be nice if there were a way in lua to fill arrays, oh wait there is pipes! -
http://lua-users.org/wiki/FiltersAndPipesReloadedfunction my_filter( pInput, pOutput )
while ... do
...
... = pInput()
...
pOutput( ... )
...
end
so a pipe we make to take our perlin nose, transform it with the content as it goes into the pipe - and to get it out we unpack() it
like in the villages mapgen
https://forum.minetest.net/viewtopic.php?id=7263 - very complicated for me
ok, I get it, now on to my mapgen from a picture (picture with height info, like in 3d printing) - you have been wonderful and thank you!
"when, from defaults we fill with the id's of the textures for" <-- why I don't write explanations