buffer.diff 1.4 KB

1234567891011121314151617181920212223242526272829
  1. diff --git a/init.lua b/init.lua
  2. index 8921baa..799016c 100644
  3. --- a/init.lua
  4. +++ b/init.lua
  5. @@ -89,6 +89,10 @@ subterrain = {}
  6. local yblmin = YMIN + BLEND * 1.5
  7. local yblmax = YMAX - BLEND * 1.5
  8. +local nvals_cave = {}
  9. +local nvals_wave = {}
  10. +local nvals_biome = {}
  11. +
  12. -- On generated function
  13. minetest.register_on_generated(function(minp, maxp, seed)
  14. @@ -167,9 +171,9 @@ minetest.register_on_generated(function(minp, maxp, seed)
  15. local minposxyz = {x=x0, y=y0, z=z0} --bottom corner
  16. local minposxz = {x=x0, y=z0} --2D bottom corner
  17. - local nvals_cave = minetest.get_perlin_map(np_cave, chulens):get3dMap_flat(minposxyz) --cave noise for structure
  18. - local nvals_wave = minetest.get_perlin_map(np_wave, chulens):get3dMap_flat(minposxyz) --wavy structure of cavern ceilings and floors
  19. - local nvals_biome = minetest.get_perlin_map(np_biome, chulens2D):get2dMap_flat({x=x0+150, y=z0+50}) --2D noise for biomes (will be 3D humidity/temp later)
  20. + minetest.get_perlin_map(np_cave, chulens):get3dMap_flat(minposxyz, nvals_cave) --cave noise for structure
  21. + minetest.get_perlin_map(np_wave, chulens):get3dMap_flat(minposxyz, nvals_wave) --wavy structure of cavern ceilings and floors
  22. + minetest.get_perlin_map(np_biome, chulens2D):get2dMap_flat({x=x0+150, y=z0+50}, nvals_biome) --2D noise for biomes (will be 3D humidity/temp later)
  23. local nixyz = 1 --3D node index
  24. local nixz = 1 --2D node index