mapgen.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. --
  2. -- Aliases for map generator outputs
  3. --
  4. minetest.register_alias("mapgen_stone", "default:stone")
  5. minetest.register_alias("mapgen_dirt", "default:dirt")
  6. minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass")
  7. minetest.register_alias("mapgen_sand", "default:sand")
  8. minetest.register_alias("mapgen_water_source", "default:water_source")
  9. minetest.register_alias("mapgen_river_water_source", "default:river_water_source")
  10. minetest.register_alias("mapgen_lava_source", "default:lava_source")
  11. minetest.register_alias("mapgen_gravel", "default:gravel")
  12. minetest.register_alias("mapgen_tree", "default:tree")
  13. minetest.register_alias("mapgen_leaves", "default:leaves")
  14. minetest.register_alias("mapgen_apple", "default:apple")
  15. minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
  16. minetest.register_alias("mapgen_cobble", "default:cobble")
  17. minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
  18. minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
  19. --
  20. -- Ore generation
  21. --
  22. -- Blob ore first to avoid other ores inside blobs
  23. minetest.register_ore({
  24. ore_type = "blob",
  25. ore = "default:clay",
  26. wherein = {"default:sand"},
  27. clust_scarcity = 24*24*24,
  28. clust_size = 7,
  29. y_min = -15,
  30. y_max = 0,
  31. noise_threshold = 0,
  32. noise_params = {
  33. offset=0.35,
  34. scale=0.2,
  35. spread={x=5, y=5, z=5},
  36. seed=-316,
  37. octaves=1,
  38. persist=0.5
  39. },
  40. })
  41. minetest.register_ore({
  42. ore_type = "scatter",
  43. ore = "default:stone_with_coal",
  44. wherein = "default:stone",
  45. clust_scarcity = 8*8*8,
  46. clust_num_ores = 8,
  47. clust_size = 3,
  48. y_min = -31000,
  49. y_max = 64,
  50. })
  51. minetest.register_ore({
  52. ore_type = "scatter",
  53. ore = "default:stone_with_iron",
  54. wherein = "default:stone",
  55. clust_scarcity = 12*12*12,
  56. clust_num_ores = 3,
  57. clust_size = 2,
  58. y_min = -15,
  59. y_max = 2,
  60. })
  61. minetest.register_ore({
  62. ore_type = "scatter",
  63. ore = "default:stone_with_iron",
  64. wherein = "default:stone",
  65. clust_scarcity = 9*9*9,
  66. clust_num_ores = 5,
  67. clust_size = 3,
  68. y_min = -63,
  69. y_max = -16,
  70. })
  71. minetest.register_ore({
  72. ore_type = "scatter",
  73. ore = "default:stone_with_iron",
  74. wherein = "default:stone",
  75. clust_scarcity = 7*7*7,
  76. clust_num_ores = 5,
  77. clust_size = 3,
  78. y_min = -31000,
  79. y_max = -64,
  80. })
  81. --
  82. -- Register biomes for biome API
  83. --
  84. minetest.clear_registered_biomes()
  85. minetest.clear_registered_decorations()
  86. minetest.register_biome({
  87. name = "default:grassland",
  88. --node_dust = "",
  89. node_top = "default:dirt_with_grass",
  90. depth_top = 1,
  91. node_filler = "default:dirt",
  92. depth_filler = 1,
  93. --node_stone = "",
  94. --node_water_top = "",
  95. --depth_water_top = ,
  96. --node_water = "",
  97. y_min = 5,
  98. y_max = 31000,
  99. heat_point = 50,
  100. humidity_point = 50,
  101. })
  102. minetest.register_biome({
  103. name = "default:grassland_ocean",
  104. --node_dust = "",
  105. node_top = "default:sand",
  106. depth_top = 1,
  107. node_filler = "default:sand",
  108. depth_filler = 2,
  109. --node_stone = "",
  110. --node_water_top = "",
  111. --depth_water_top = ,
  112. --node_water = "",
  113. y_min = -31000,
  114. y_max = 4,
  115. heat_point = 50,
  116. humidity_point = 50,
  117. })