I have read the modding API for mapgen and I don't get it.
I have tried looking at mods that add biomes(snow biome).
I just have not been able to understand it.
If anyone could explain mapgen to me I would appreciate it, if not it's alright.
leetelate wrote: 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
if nvals[ni] - (y - 25) / 55 > 0.5 thenUsers browsing this forum: No registered users and 12 guests