init.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. -- This file is donated to the public domain.
  2. -- Original author: Pedro Gimeno Fortea.
  3. -- Many thanks to Paramat for the numerous tips.
  4. minetest.set_mapgen_setting('mg_name', 'flat', true)
  5. minetest.set_mapgen_setting('mgflat_ground_level', 0, true)
  6. -- water has to be below ground level to not inundate everything;
  7. -- it can't be equal lest you spawn at (0,0,0). It should be equal to
  8. -- ground_level - 1 for correct lighting underground, I'm told.
  9. minetest.set_mapgen_setting('water_level', -1, true)
  10. minetest.set_mapgen_setting('mg_flags', 'light, nocaves, nodungeons, nodecorations', true);
  11. minetest.clear_registered_biomes()
  12. minetest.clear_registered_ores()
  13. minetest.clear_registered_decorations()
  14. minetest.register_biome {
  15. name = "flatworld",
  16. --node_dust = "",
  17. node_top = "default:dirt_with_grass", -- layer 1
  18. depth_top = 1,
  19. node_filler = "default:dirt", -- layer 2
  20. depth_filler = 1,
  21. node_stone = "default:dirt", -- layer 3 (all the way to the bottom)
  22. --node_water_top = "",
  23. --depth_water_top = ,
  24. --node_water = "",
  25. --node_river_water = "",
  26. y_min = -31000,
  27. y_max = 31000,
  28. heat_point = 50,
  29. humidity_point = 50,
  30. }
  31. -- <paramat> you can stack biomes on top of each other if you need changes of
  32. -- materials with depth
  33. -- Note: On 0.4.15 it generates some errors but these are safe to ignore. I'm
  34. -- told they have been removed from current master.