deco.lua 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240
  1. ------------------------------------------------------
  2. local grassland_on = {"nodes_nature:grassland_soil", "nodes_nature:grassland_soil_wet"}
  3. local marshland_on = {"nodes_nature:marshland_soil", "nodes_nature:marshland_soil_wet"}
  4. local highland_on = {"nodes_nature:highland_soil", "nodes_nature:highland_soil_wet"}
  5. local duneland_on = {"nodes_nature:duneland_soil", "nodes_nature:duneland_soil_wet"}
  6. local woodland_on = {"nodes_nature:woodland_soil", "nodes_nature:woodland_soil_wet"}
  7. local all_soils_on = {
  8. "nodes_nature:marshland_soil",
  9. "nodes_nature:marshland_soil_wet",
  10. "nodes_nature:grassland_soil",
  11. "nodes_nature:grassland_soil_wet",
  12. "nodes_nature:highland_soil",
  13. "nodes_nature:highland_soil_wet",
  14. "nodes_nature:duneland_soil",
  15. "nodes_nature:duneland_soil_wet",
  16. "nodes_nature:woodland_soil",
  17. "nodes_nature:woodland_soil_wet"
  18. }
  19. local lowland_ymax = 600
  20. local lowland_ymin = 1
  21. --------------------------------------
  22. --Schematics
  23. local s1 = { name = "nodes_nature:gemedi", param2 = 2 }
  24. local gemedi = {
  25. size = {y = 7, x = 1, z = 1},
  26. data = {
  27. s1, s1, s1, s1, s1, s1, s1
  28. },
  29. yslice_prob = {
  30. {ypos = 0, prob = 255},
  31. {ypos = 1, prob = 245},
  32. {ypos = 2, prob = 225},
  33. {ypos = 3, prob = 205},
  34. {ypos = 4, prob = 155},
  35. {ypos = 5, prob = 55},
  36. {ypos = 6, prob = 35},
  37. },
  38. }
  39. local s2 = { name = "nodes_nature:cana", param2 = 2 }
  40. local cana = {
  41. size = {y = 7, x = 1, z = 1},
  42. data = {
  43. s2, s2, s2, s2, s2, s2, s2
  44. },
  45. yslice_prob = {
  46. {ypos = 0, prob = 255},
  47. {ypos = 1, prob = 255},
  48. {ypos = 2, prob = 255},
  49. {ypos = 3, prob = 255},
  50. {ypos = 4, prob = 230},
  51. {ypos = 5, prob = 155},
  52. {ypos = 6, prob = 105},
  53. },
  54. }
  55. local s3 = { name = "nodes_nature:tiken", param2 = 2 }
  56. local tiken = {
  57. size = {y = 7, x = 1, z = 1},
  58. data = {
  59. s3, s3, s3, s3, s3, s3, s3
  60. },
  61. yslice_prob = {
  62. {ypos = 0, prob = 255},
  63. {ypos = 1, prob = 255},
  64. {ypos = 2, prob = 255},
  65. {ypos = 3, prob = 255},
  66. {ypos = 4, prob = 230},
  67. {ypos = 5, prob = 155},
  68. {ypos = 6, prob = 105},
  69. },
  70. }
  71. -----------------------------------------------------
  72. --OCEANS
  73. --kelp
  74. minetest.register_decoration({
  75. name = "nodes_nature:kelp",
  76. deco_type = "simple",
  77. place_on = {"nodes_nature:gravel", "nodes_nature:gravel_wet_salty"},
  78. place_offset_y = -1,
  79. sidelen = 16,
  80. noise_params = {
  81. offset = -0.04,
  82. scale = 0.3,
  83. spread = {x = 64, y = 64, z = 64},
  84. seed = 82112,
  85. octaves = 3,
  86. persist = 0.8
  87. },
  88. y_max = -7,
  89. y_min = -15,
  90. flags = "force_placement",
  91. decoration = "nodes_nature:kelp",
  92. param2 = 48,
  93. param2_max = 96,
  94. })
  95. --seagrass
  96. minetest.register_decoration({
  97. name = "nodes_nature:seagrass",
  98. deco_type = "simple",
  99. place_on = {"nodes_nature:sand", "nodes_nature:sand_wet_salty"},
  100. place_offset_y = -1,
  101. sidelen = 16,
  102. noise_params = {
  103. offset = 0,
  104. scale = 0.4,
  105. spread = {x = 32, y = 32, z = 32},
  106. seed = 11312,
  107. octaves = 3,
  108. persist = 0.8
  109. },
  110. y_max = -2,
  111. y_min = -5,
  112. flags = "force_placement",
  113. decoration = "nodes_nature:seagrass",
  114. param2 = 16,
  115. })
  116. --sea lettuce
  117. minetest.register_decoration({
  118. name = "nodes_nature:sea_lettuce",
  119. deco_type = "simple",
  120. place_on = {"nodes_nature:silt", "nodes_nature:silt_wet_salty"},
  121. place_offset_y = -1,
  122. sidelen = 16,
  123. noise_params = {
  124. offset = 0,
  125. scale = 0.4,
  126. spread = {x = 32, y = 32, z = 32},
  127. seed = 84322,
  128. octaves = 3,
  129. persist = 0.8
  130. },
  131. y_max = -2,
  132. y_min = -5,
  133. flags = "force_placement",
  134. decoration = "nodes_nature:sea_lettuce",
  135. param2 = 16,
  136. })
  137. -----------------------------------------------------
  138. --maraka in grassland
  139. minetest.register_decoration({
  140. name = "nodes_nature:maraka_tree",
  141. deco_type = "schematic",
  142. place_on = grassland_on,
  143. sidelen = 16,
  144. noise_params = {
  145. offset = 0,
  146. scale = 0.0007,
  147. spread = {x = 250, y = 250, z = 250},
  148. seed = 222,
  149. octaves = 3,
  150. persist = 0.7
  151. },
  152. y_max = 22,
  153. y_min = lowland_ymin,
  154. schematic = minetest.get_modpath("mapgen") .. "/schematics/maraka_tree.mts",
  155. place_offset_y = -3,
  156. flags = "place_center_x, place_center_z",
  157. rotation = "random",
  158. })
  159. --maraka in woodland
  160. minetest.register_decoration({
  161. name = "nodes_nature:maraka_tree2",
  162. deco_type = "schematic",
  163. place_on =woodland_on,
  164. sidelen = 80,
  165. fill_ratio = 0.006,
  166. y_max = 40,
  167. y_min = lowland_ymin,
  168. schematic = minetest.get_modpath("mapgen") .. "/schematics/maraka_tree.mts",
  169. place_offset_y = -3,
  170. flags = "place_center_x, place_center_z",
  171. rotation = "random",
  172. })
  173. minetest.register_decoration({
  174. name = "nodes_nature:tangkal_tree_old",
  175. deco_type = "schematic",
  176. place_on =woodland_on,
  177. sidelen = 80,
  178. fill_ratio = 0.0009,
  179. y_max = 25,
  180. y_min = lowland_ymin,
  181. schematic = minetest.get_modpath("mapgen") .. "/schematics/tangkal_old.mts",
  182. place_offset_y = -5,
  183. flags = "place_center_x, place_center_z",
  184. rotation = "random",
  185. })
  186. --tangkal in woodland
  187. minetest.register_decoration({
  188. name = "nodes_nature:tangkal_tree",
  189. deco_type = "schematic",
  190. place_on =woodland_on,
  191. sidelen = 80,
  192. fill_ratio = 0.0007,
  193. y_max = 25,
  194. y_min = lowland_ymin,
  195. schematic = minetest.get_modpath("mapgen") .. "/schematics/tangkal_tree.mts",
  196. place_offset_y = -5,
  197. flags = "place_center_x, place_center_z",
  198. rotation = "random",
  199. })
  200. minetest.register_decoration({
  201. name = "nodes_nature:tangkal_tree_young",
  202. deco_type = "schematic",
  203. place_on =woodland_on,
  204. sidelen = 80,
  205. fill_ratio = 0.0005,
  206. y_max = 25,
  207. y_min = lowland_ymin,
  208. schematic = minetest.get_modpath("mapgen") .. "/schematics/tangkal_young.mts",
  209. place_offset_y = -3,
  210. flags = "place_center_x, place_center_z",
  211. rotation = "random",
  212. })
  213. -------------------------------
  214. --Fills
  215. -- Sediment
  216. minetest.register_decoration({
  217. name = "nodes_nature:gravel",
  218. deco_type = "simple",
  219. place_on = {"group:sand", "nodes_nature:silt"},
  220. sidelen = 4,
  221. noise_params = {
  222. offset = -0.8,
  223. scale = 2.0,
  224. spread = {x = 100, y = 100, z = 100},
  225. seed = 53995,
  226. octaves = 3,
  227. persist = 1.0
  228. },
  229. y_max = 1,
  230. y_min = -1,
  231. decoration = "nodes_nature:gravel",
  232. spawn_by = "group:water",
  233. num_spawn_by = 1,
  234. place_offset_y = -1,
  235. flags = "force_placement",
  236. })
  237. --wet sediments in low points
  238. minetest.register_decoration({
  239. name = "nodes_nature:loam_wet",
  240. deco_type = "simple",
  241. place_on = {"nodes_nature:loam"},
  242. sidelen = 4,
  243. noise_params = {
  244. offset = -0.4,
  245. scale = 3.0,
  246. spread = {x = 32, y = 32, z = 32},
  247. seed = 7995,
  248. octaves = 3,
  249. persist = 1.0
  250. },
  251. y_max = 9,
  252. y_min = 0,
  253. decoration = "nodes_nature:loam_wet",
  254. place_offset_y = -1,
  255. flags = "force_placement",
  256. })
  257. minetest.register_decoration({
  258. name = "nodes_nature:clay_wet",
  259. deco_type = "simple",
  260. place_on = {"nodes_nature:clay"},
  261. sidelen = 4,
  262. noise_params = {
  263. offset = -0.4,
  264. scale = 3.0,
  265. spread = {x = 32, y = 32, z = 32},
  266. seed = 7995,
  267. octaves = 3,
  268. persist = 1.0
  269. },
  270. y_max = 9,
  271. y_min = 0,
  272. decoration = "nodes_nature:clay_wet",
  273. place_offset_y = -1,
  274. flags = "force_placement",
  275. })
  276. minetest.register_decoration({
  277. name = "nodes_nature:silt_wet",
  278. deco_type = "simple",
  279. place_on = {"nodes_nature:silt"},
  280. sidelen = 4,
  281. noise_params = {
  282. offset = -0.4,
  283. scale = 3.0,
  284. spread = {x = 32, y = 32, z = 32},
  285. seed = 7995,
  286. octaves = 3,
  287. persist = 1.0
  288. },
  289. y_max = 9,
  290. y_min = 0,
  291. decoration = "nodes_nature:silt_wet",
  292. place_offset_y = -1,
  293. flags = "force_placement",
  294. })
  295. minetest.register_decoration({
  296. name = "nodes_nature:sand_wet",
  297. deco_type = "simple",
  298. place_on = {"nodes_nature:sand"},
  299. sidelen = 4,
  300. noise_params = {
  301. offset = -0.4,
  302. scale = 3.0,
  303. spread = {x = 32, y = 32, z = 32},
  304. seed = 7995,
  305. octaves = 3,
  306. persist = 1.0
  307. },
  308. y_max = 9,
  309. y_min = 0,
  310. decoration = "nodes_nature:sand_wet",
  311. place_offset_y = -1,
  312. flags = "force_placement",
  313. })
  314. minetest.register_decoration({
  315. name = "nodes_nature:gravel_wet",
  316. deco_type = "simple",
  317. place_on = {"nodes_nature:gravel"},
  318. sidelen = 4,
  319. noise_params = {
  320. offset = -0.4,
  321. scale = 3.0,
  322. spread = {x = 32, y = 32, z = 32},
  323. seed = 7995,
  324. octaves = 3,
  325. persist = 1.0
  326. },
  327. y_max = 9,
  328. y_min = 0,
  329. decoration = "nodes_nature:gravel_wet",
  330. place_offset_y = -1,
  331. flags = "force_placement",
  332. })
  333. ------------------------------
  334. --Grassland
  335. minetest.register_decoration({
  336. name = "nodes_nature:gemedi",
  337. deco_type = "schematic",
  338. place_on = grassland_on,
  339. sidelen = 16,
  340. noise_params = {
  341. offset = 0,
  342. scale = 1,
  343. spread = {x = 128, y = 128, z = 128},
  344. seed = 998,
  345. octaves = 3,
  346. persist = 0.8
  347. },
  348. y_max = 10,
  349. y_min = lowland_ymin,
  350. schematic = gemedi,
  351. })
  352. minetest.register_decoration({
  353. name = "nodes_nature:sari",
  354. deco_type = "simple",
  355. place_on = grassland_on,
  356. sidelen = 80,
  357. fill_ratio = 0.2,
  358. y_max = lowland_ymax,
  359. y_min = lowland_ymin,
  360. decoration = "nodes_nature:sari",
  361. param2 = 2,
  362. })
  363. minetest.register_decoration({
  364. name = "nodes_nature:gitiri",
  365. deco_type = "simple",
  366. place_on = grassland_on,
  367. sidelen = 16,
  368. noise_params = {
  369. offset = 0,
  370. scale = 0.08,
  371. spread = {x = 32, y = 32, z = 32},
  372. seed = 1001,
  373. octaves = 3,
  374. persist = 0.6
  375. },
  376. y_max = lowland_ymax,
  377. y_min = lowland_ymin,
  378. decoration = "nodes_nature:gitiri",
  379. param2 = 2,
  380. })
  381. minetest.register_decoration({
  382. name = "nodes_nature:tikusati",
  383. deco_type = "simple",
  384. place_on = grassland_on,
  385. sidelen = 16,
  386. noise_params = {
  387. offset = 0,
  388. scale = 0.001,
  389. spread = {x = 100, y = 100, z = 100},
  390. seed = 1002,
  391. octaves = 3,
  392. persist = 0.5
  393. },
  394. y_max = lowland_ymax,
  395. y_min = lowland_ymin,
  396. decoration = "nodes_nature:tikusati",
  397. param2 = 2,
  398. })
  399. minetest.register_decoration({
  400. name = "nodes_nature:wiha",
  401. deco_type = "simple",
  402. place_on = grassland_on,
  403. sidelen = 16,
  404. noise_params = {
  405. offset = 0,
  406. scale = 0.002,
  407. spread = {x = 32, y = 32, z = 32},
  408. seed = 1003,
  409. octaves = 3,
  410. persist = 0.5
  411. },
  412. y_max = lowland_ymax,
  413. y_min = lowland_ymin,
  414. decoration = "nodes_nature:wiha",
  415. param2 = 4,
  416. })
  417. minetest.register_decoration({
  418. name = "nodes_nature:hakimi",
  419. deco_type = "simple",
  420. place_on = grassland_on,
  421. sidelen = 16,
  422. noise_params = {
  423. offset = 0,
  424. scale = 0.001,
  425. spread = {x = 100, y = 100, z = 100},
  426. seed = 1004,
  427. octaves = 3,
  428. persist = 0.5
  429. },
  430. max = lowland_ymax,
  431. y_min = lowland_ymin,
  432. decoration = "nodes_nature:hakimi",
  433. param2 = 3,
  434. })
  435. minetest.register_decoration({
  436. name = "nodes_nature:nebiyi",
  437. deco_type = "simple",
  438. place_on = grassland_on,
  439. sidelen = 16,
  440. noise_params = {
  441. offset = 0,
  442. scale = 0.001,
  443. spread = {x = 100, y = 100, z = 100},
  444. seed = 1005,
  445. octaves = 3,
  446. persist = 0.5
  447. },
  448. y_max = lowland_ymax,
  449. y_min = lowland_ymin,
  450. decoration = "nodes_nature:nebiyi",
  451. param2 = 1,
  452. })
  453. minetest.register_decoration({
  454. name = "nodes_nature:zufani",
  455. deco_type = "simple",
  456. place_on = grassland_on,
  457. sidelen = 16,
  458. noise_params = {
  459. offset = 0,
  460. scale = 0.002,
  461. spread = {x = 32, y = 32, z = 32},
  462. seed = 1006,
  463. octaves = 3,
  464. persist = 0.5
  465. },
  466. y_max = lowland_ymax,
  467. y_min = lowland_ymin,
  468. decoration = "nodes_nature:zufani",
  469. param2 = 2,
  470. })
  471. ------------------------------
  472. --Marshland
  473. minetest.register_decoration({
  474. name = "nodes_nature:cana",
  475. deco_type = "schematic",
  476. place_on = marshland_on,
  477. sidelen = 16,
  478. noise_params = {
  479. offset = 0,
  480. scale = 1,
  481. spread = {x = 16, y = 16, z = 16},
  482. seed = 578,
  483. octaves = 3,
  484. persist = 0.7
  485. },
  486. y_max = 5,
  487. y_min = lowland_ymin,
  488. schematic = cana,
  489. })
  490. minetest.register_decoration({
  491. name = "nodes_nature:tanai",
  492. deco_type = "simple",
  493. place_on = marshland_on,
  494. sidelen = 80,
  495. fill_ratio = 0.3,
  496. y_max = lowland_ymax,
  497. y_min = lowland_ymin,
  498. decoration = "nodes_nature:tanai",
  499. param2 = 4,
  500. })
  501. minetest.register_decoration({
  502. name = "nodes_nature:galanta",
  503. deco_type = "simple",
  504. place_on = marshland_on,
  505. sidelen = 16,
  506. noise_params = {
  507. offset = 0,
  508. scale = 0.002,
  509. spread = {x = 32, y = 32, z = 32},
  510. seed = 153,
  511. octaves = 3,
  512. persist = 0.5
  513. },
  514. y_max = lowland_ymax,
  515. y_min = lowland_ymin,
  516. decoration = "nodes_nature:galanta",
  517. param2 = 4,
  518. })
  519. minetest.register_decoration({
  520. name = "nodes_nature:marbhan",
  521. deco_type = "simple",
  522. place_on = marshland_on,
  523. sidelen = 16,
  524. noise_params = {
  525. offset = 0,
  526. scale = 0.001,
  527. spread = {x = 100, y = 100, z = 100},
  528. seed = 5505,
  529. octaves = 3,
  530. persist = 0.5
  531. },
  532. y_max = lowland_ymax,
  533. y_min = lowland_ymin,
  534. decoration = "nodes_nature:marbhan",
  535. param2 = 2,
  536. })
  537. minetest.register_decoration({
  538. name = "nodes_nature:bronach",
  539. deco_type = "simple",
  540. place_on = marshland_on,
  541. sidelen = 16,
  542. noise_params = {
  543. offset = 0,
  544. scale = 0.06,
  545. spread = {x = 16, y = 16, z = 16},
  546. seed = 1707,
  547. octaves = 3,
  548. persist = 0.9
  549. },
  550. y_max = lowland_ymax,
  551. y_min = lowland_ymin,
  552. decoration = "nodes_nature:bronach",
  553. param2 = 3,
  554. })
  555. ------------------------------
  556. --duneland
  557. minetest.register_decoration({
  558. name = "nodes_nature:tiken",
  559. deco_type = "schematic",
  560. place_on = duneland_on,
  561. sidelen = 16,
  562. noise_params = {
  563. offset = 0,
  564. scale = 1,
  565. spread = {x = 64, y = 64, z = 64},
  566. seed = 998,
  567. octaves = 3,
  568. persist = 0.9
  569. },
  570. y_max = 7,
  571. y_min = lowland_ymin,
  572. schematic = tiken,
  573. })
  574. minetest.register_decoration({
  575. name = "nodes_nature:alaf",
  576. deco_type = "simple",
  577. place_on = duneland_on,
  578. sidelen = 80,
  579. fill_ratio = 0.1,
  580. y_max = lowland_ymax + 20,
  581. y_min = lowland_ymin,
  582. decoration = "nodes_nature:alaf",
  583. param2 = 4,
  584. })
  585. minetest.register_decoration({
  586. name = "nodes_nature:anperla",
  587. deco_type = "simple",
  588. place_on = duneland_on,
  589. sidelen = 16,
  590. noise_params = {
  591. offset = 0,
  592. scale = 0.001,
  593. spread = {x = 32, y = 32, z = 32},
  594. seed = 1112,
  595. octaves = 3,
  596. persist = 0.8
  597. },
  598. y_max = lowland_ymax + 20,
  599. y_min = lowland_ymin,
  600. decoration = "nodes_nature:anperla",
  601. param2 = 3,
  602. })
  603. ------------------------------
  604. --Highland
  605. minetest.register_decoration({
  606. name = "nodes_nature:thoka",
  607. deco_type = "simple",
  608. place_on = highland_on,
  609. sidelen = 80,
  610. fill_ratio = 0.3,
  611. y_max = 31000,
  612. y_min = lowland_ymin,
  613. decoration = "nodes_nature:thoka",
  614. param2 = 4,
  615. })
  616. minetest.register_decoration({
  617. name = "nodes_nature:merki",
  618. deco_type = "simple",
  619. place_on = highland_on,
  620. sidelen = 16,
  621. noise_params = {
  622. offset = 0,
  623. scale = 0.002,
  624. spread = {x = 32, y = 32, z = 32},
  625. seed = 1112,
  626. octaves = 3,
  627. persist = 0.8
  628. },
  629. y_max = lowland_ymax,
  630. y_min = lowland_ymin,
  631. decoration = "nodes_nature:merki",
  632. param2 = 2,
  633. })
  634. ------------------------------
  635. --woodland
  636. minetest.register_decoration({
  637. name = "nodes_nature:damo",
  638. deco_type = "simple",
  639. place_on = woodland_on,
  640. sidelen = 80,
  641. fill_ratio = 0.1,
  642. y_max = lowland_ymax + 50,
  643. y_min = lowland_ymin,
  644. decoration = "nodes_nature:damo",
  645. param2 = 4,
  646. })
  647. minetest.register_decoration({
  648. name = "nodes_nature:vansano",
  649. deco_type = "simple",
  650. place_on = woodland_on,
  651. sidelen = 80,
  652. fill_ratio = 0.01,
  653. y_max = lowland_ymax + 50,
  654. y_min = lowland_ymin,
  655. decoration = "nodes_nature:vansano",
  656. param2 = 2,
  657. })
  658. ------------------------------
  659. --Boulders
  660. minetest.register_decoration({
  661. name = "nodes_nature:granite_boulder",
  662. deco_type = "simple",
  663. place_on = "nodes_nature:granite",
  664. sidelen = 80,
  665. fill_ratio = 0.05,
  666. y_max = 31000,
  667. y_min = -31000,
  668. decoration = "nodes_nature:granite_boulder",
  669. flags = "all_floors",
  670. })
  671. minetest.register_decoration({
  672. name = "nodes_nature:limestone_boulder",
  673. deco_type = "simple",
  674. place_on = "nodes_nature:limestone",
  675. sidelen = 80,
  676. fill_ratio = 0.05,
  677. y_max = 31000,
  678. y_min = -31000,
  679. decoration = "nodes_nature:limestone_boulder",
  680. flags = "all_floors",
  681. })
  682. minetest.register_decoration({
  683. name = "nodes_nature:basalt_boulder",
  684. deco_type = "simple",
  685. place_on = "nodes_nature:basalt",
  686. sidelen = 80,
  687. fill_ratio = 0.05,
  688. y_max = 31000,
  689. y_min = -31000,
  690. decoration = "nodes_nature:basalt_boulder",
  691. flags = "all_floors",
  692. })
  693. --ironstone..dense on deposits
  694. minetest.register_decoration({
  695. name = "nodes_nature:ironstone_boulder",
  696. deco_type = "simple",
  697. place_on = "nodes_nature:ironstone",
  698. sidelen = 80,
  699. fill_ratio = 0.6,
  700. y_max = 31000,
  701. y_min = -31000,
  702. decoration = "nodes_nature:ironstone_boulder",
  703. flags = "all_floors",
  704. })
  705. minetest.register_decoration({
  706. name = "nodes_nature:gneiss_boulder",
  707. deco_type = "simple",
  708. place_on = "nodes_nature:gneiss",
  709. sidelen = 80,
  710. fill_ratio = 0.05,
  711. y_max = 31000,
  712. y_min = -31000,
  713. decoration = "nodes_nature:gneiss_boulder",
  714. flags = "all_floors",
  715. })
  716. minetest.register_decoration({
  717. name = "nodes_nature:jade_boulder",
  718. deco_type = "simple",
  719. place_on = "nodes_nature:jade",
  720. sidelen = 80,
  721. fill_ratio = 0.4,
  722. y_max = 31000,
  723. y_min = -31000,
  724. decoration = "nodes_nature:jade_boulder",
  725. flags = "all_floors",
  726. })
  727. ------------------------------
  728. --Cave sediments
  729. minetest.register_decoration({
  730. name = "cave_gravel",
  731. deco_type = "simple",
  732. place_on = {
  733. "nodes_nature:granite",
  734. "nodes_nature:limestone",
  735. "nodes_nature:gneiss",
  736. "nodes_nature:conglomerate",
  737. },
  738. sidelen = 4,
  739. noise_params = {
  740. offset = -0.4,
  741. scale = 3.0,
  742. spread = {x = 32, y = 32, z = 32},
  743. seed = 873515,
  744. octaves = 2,
  745. persist = 0.9
  746. },
  747. y_max = 31000,
  748. y_min = -31000,
  749. decoration = "nodes_nature:gravel",
  750. place_offset_y = -1,
  751. flags = "all_floors, force_placement",
  752. })
  753. minetest.register_decoration({
  754. name = "cave_sand",
  755. deco_type = "simple",
  756. place_on = {
  757. "nodes_nature:granite",
  758. "nodes_nature:limestone",
  759. "nodes_nature:gneiss",
  760. "nodes_nature:sandstone",
  761. },
  762. sidelen = 4,
  763. noise_params = {
  764. offset = -0.4,
  765. scale = 3.0,
  766. spread = {x = 32, y = 32, z = 32},
  767. seed = 795515,
  768. octaves = 2,
  769. persist = 0.9
  770. },
  771. y_max = 31000,
  772. y_min = -31000,
  773. decoration = "nodes_nature:sand",
  774. place_offset_y = -1,
  775. flags = "all_floors, force_placement",
  776. })
  777. minetest.register_decoration({
  778. name = "cave_clay",
  779. deco_type = "simple",
  780. place_on = {
  781. "nodes_nature:granite",
  782. "nodes_nature:limestone",
  783. "nodes_nature:gneiss",
  784. "nodes_nature:claystone",
  785. },
  786. sidelen = 4,
  787. noise_params = {
  788. offset = -0.4,
  789. scale = 3.0,
  790. spread = {x = 32, y = 32, z = 32},
  791. seed = 87005,
  792. octaves = 2,
  793. persist = 0.9
  794. },
  795. y_max = 31000,
  796. y_min = -31000,
  797. decoration = "nodes_nature:clay",
  798. place_offset_y = -1,
  799. flags = "all_floors, force_placement",
  800. })
  801. minetest.register_decoration({
  802. name = "cave_silt",
  803. deco_type = "simple",
  804. place_on = {
  805. "nodes_nature:granite",
  806. "nodes_nature:limestone",
  807. "nodes_nature:gneiss",
  808. "nodes_nature:siltstone",
  809. },
  810. sidelen = 4,
  811. noise_params = {
  812. offset = -0.4,
  813. scale = 3.0,
  814. spread = {x = 32, y = 32, z = 32},
  815. seed = 87005,
  816. octaves = 2,
  817. persist = 0.9
  818. },
  819. y_max = 31000,
  820. y_min = -31000,
  821. decoration = "nodes_nature:silt",
  822. place_offset_y = -1,
  823. flags = "all_floors, force_placement",
  824. })
  825. ------------------------------
  826. --Cave mushrooms.. artifact species escaped from cultivation
  827. minetest.register_decoration({
  828. name = "nodes_nature:lambakap",
  829. deco_type = "simple",
  830. place_on = {
  831. "nodes_nature:silt",
  832. "nodes_nature:clay",
  833. "nodes_nature:sand",
  834. "nodes_nature:gravel"
  835. },
  836. sidelen = 80,
  837. fill_ratio = 0.01,
  838. y_max = -80,
  839. y_min = -950,
  840. decoration = "nodes_nature:lambakap",
  841. flags = "all_floors",
  842. })
  843. minetest.register_decoration({
  844. name = "nodes_nature:reshedaar",
  845. deco_type = "simple",
  846. place_on = {
  847. "nodes_nature:silt",
  848. "nodes_nature:clay",
  849. "nodes_nature:sand",
  850. "nodes_nature:gravel"
  851. },
  852. sidelen = 80,
  853. fill_ratio = 0.01,
  854. y_max = -80,
  855. y_min = -950,
  856. decoration = "nodes_nature:reshedaar",
  857. flags = "all_floors",
  858. })
  859. minetest.register_decoration({
  860. name = "nodes_nature:mahal",
  861. deco_type = "simple",
  862. place_on = {
  863. "nodes_nature:silt",
  864. "nodes_nature:clay",
  865. "nodes_nature:sand",
  866. "nodes_nature:gravel"
  867. },
  868. sidelen = 80,
  869. fill_ratio = 0.01,
  870. y_max = -80,
  871. y_min = -950,
  872. decoration = "nodes_nature:mahal",
  873. flags = "all_floors",
  874. })
  875. -----------------------------------------------------
  876. --Animal eggs
  877. --gundu_eggs
  878. minetest.register_decoration({
  879. name = "animals:gundu_eggs",
  880. deco_type = "simple",
  881. place_on = {"nodes_nature:silt", "nodes_nature:silt_wet_salty", "nodes_nature:sand", "nodes_nature:sand_wet_salty"},
  882. sidelen = 80,
  883. fill_ratio = 0.0005,
  884. y_max = -5,
  885. y_min = -25,
  886. flags = "force_placement",
  887. decoration = "animals:gundu_eggs",
  888. })
  889. --sarkamos egg
  890. minetest.register_decoration({
  891. name = "animals:sarkamos_eggs",
  892. deco_type = "simple",
  893. place_on = {"nodes_nature:silt", "nodes_nature:silt_wet_salty", "nodes_nature:sand", "nodes_nature:sand_wet_salty"},
  894. sidelen = 80,
  895. fill_ratio = 0.00007,
  896. y_max = -7,
  897. y_min = -35,
  898. flags = "force_placement",
  899. decoration = "animals:sarkamos_eggs",
  900. })
  901. --impethu_eggs
  902. minetest.register_decoration({
  903. name = "animals:impethu_eggs",
  904. deco_type = "simple",
  905. place_on = {
  906. "nodes_nature:granite",
  907. "nodes_nature:basalt",
  908. "nodes_nature:limestone",
  909. "nodes_nature:sandstone",
  910. "nodes_nature:siltstone",
  911. "nodes_nature:claystone",
  912. "nodes_nature:silt",
  913. "nodes_nature:clay",
  914. "nodes_nature:sand",
  915. "nodes_nature:gravel"},
  916. sidelen = 80,
  917. fill_ratio = 0.005,
  918. y_max = lowland_ymax,
  919. y_min = -1300,
  920. decoration = "animals:impethu_eggs",
  921. flags = "all_floors",
  922. })
  923. --kubwakubwa_eggs
  924. minetest.register_decoration({
  925. name = "animals:kubwakubwa_eggs",
  926. deco_type = "simple",
  927. place_on = {
  928. "nodes_nature:granite",
  929. "nodes_nature:basalt",
  930. "nodes_nature:limestone",
  931. "nodes_nature:sandstone",
  932. "nodes_nature:siltstone",
  933. "nodes_nature:claystone",
  934. "nodes_nature:silt",
  935. "nodes_nature:clay",
  936. "nodes_nature:sand",
  937. "nodes_nature:gravel"},
  938. sidelen = 80,
  939. fill_ratio = 0.0015,
  940. y_max = lowland_ymax,
  941. y_min = -150,
  942. decoration = "animals:kubwakubwa_eggs",
  943. flags = "all_floors",
  944. })
  945. minetest.register_decoration({
  946. name = "animals:kubwakubwa_eggs_land",
  947. deco_type = "simple",
  948. place_on = all_soils_on,
  949. sidelen = 80,
  950. fill_ratio = 0.0001,
  951. y_max = lowland_ymax,
  952. y_min = 2,
  953. decoration = "animals:kubwakubwa_eggs",
  954. flags = "all_floors",
  955. })
  956. --darkasthaan_eggs
  957. minetest.register_decoration({
  958. name = "animals:darkasthaan_eggs",
  959. deco_type = "simple",
  960. place_on = {
  961. "nodes_nature:granite",
  962. "nodes_nature:basalt",
  963. "nodes_nature:silt",
  964. "nodes_nature:clay",
  965. "nodes_nature:sand",
  966. "nodes_nature:gravel"},
  967. sidelen = 80,
  968. fill_ratio = 0.002,
  969. y_max = -130,
  970. y_min = -1300,
  971. decoration = "animals:darkasthaan_eggs",
  972. flags = "all_floors",
  973. })
  974. --pegasun_eggs
  975. minetest.register_decoration({
  976. name = "animals:pegasun_eggs",
  977. deco_type = "simple",
  978. place_on = all_soils_on,
  979. sidelen = 16,
  980. noise_params = {
  981. offset = 0,
  982. scale = 0.0015,
  983. spread = {x = 100, y = 100, z = 100},
  984. seed = 1882,
  985. octaves = 2,
  986. persist = 0.9
  987. },
  988. y_max = lowland_ymax,
  989. y_min = 3,
  990. decoration = "animals:pegasun_eggs",
  991. flags = "all_floors",
  992. })
  993. --sneachan_eggs
  994. minetest.register_decoration({
  995. name = "animals:sneachan_eggs",
  996. deco_type = "simple",
  997. place_on = all_soils_on,
  998. sidelen = 80,
  999. fill_ratio = 0.002,
  1000. y_max = lowland_ymax,
  1001. y_min = 3,
  1002. decoration = "animals:sneachan_eggs",
  1003. flags = "all_floors",
  1004. })
  1005. ------------------------------
  1006. --Multiple biomes
  1007. minetest.register_decoration({
  1008. name = "nodes_nature:moss",
  1009. deco_type = "simple",
  1010. place_on = all_soils_on,
  1011. sidelen = 16,
  1012. noise_params = {
  1013. offset = 0,
  1014. scale = 0.005,
  1015. spread = {x = 100, y = 100, z = 100},
  1016. seed = 1000,
  1017. octaves = 3,
  1018. persist = 0.9
  1019. },
  1020. y_max = lowland_ymax,
  1021. y_min = lowland_ymin,
  1022. decoration = "nodes_nature:moss",
  1023. })
  1024. --denser moss in marsh
  1025. minetest.register_decoration({
  1026. name = "nodes_nature:moss",
  1027. deco_type = "simple",
  1028. place_on = {
  1029. "nodes_nature:marshland_soil",
  1030. "nodes_nature:marshland_soil_wet",
  1031. "nodes_nature:highland_soil",
  1032. "nodes_nature:highland_soil_wet",
  1033. "nodes_nature:woodland_soil",
  1034. "nodes_nature:woodland_soil_wet"
  1035. },
  1036. sidelen = 16,
  1037. noise_params = {
  1038. offset = 0,
  1039. scale = 0.09,
  1040. spread = {x = 16, y = 16, z = 16},
  1041. seed = 1640,
  1042. octaves = 3,
  1043. persist = 0.8
  1044. },
  1045. y_max = 31000,
  1046. y_min = 1,
  1047. decoration = "nodes_nature:moss",
  1048. })
  1049. -----------------------------------
  1050. --Start node timers
  1051. -- get decoration IDs
  1052. local gundu_eggs = minetest.get_decoration_id("animals:gundu_eggs")
  1053. local sarkamos_eggs = minetest.get_decoration_id("animals:sarkamos_eggs")
  1054. local impethu_eggs = minetest.get_decoration_id("animals:impethu_eggs")
  1055. local kubwakubwa_eggs = minetest.get_decoration_id("animals:kubwakubwa_eggs")
  1056. local kubwakubwa_eggs_land = minetest.get_decoration_id("animals:kubwakubwa_eggs_land")
  1057. local darkasthaan_eggs = minetest.get_decoration_id("animals:darkasthaan_eggs")
  1058. local pegasun_eggs = minetest.get_decoration_id("animals:pegasun_eggs")
  1059. local sneachan_eggs = minetest.get_decoration_id("animals:sneachan_eggs")
  1060. minetest.set_gen_notify(
  1061. {decoration = true},
  1062. {
  1063. gundu_eggs,
  1064. sarkamos_eggs,
  1065. impethu_eggs,
  1066. kubwakubwa_eggs,
  1067. kubwakubwa_eggs_land,
  1068. darkasthaan_eggs,
  1069. pegasun_eggs,
  1070. sneachan_eggs
  1071. })
  1072. -- start nodetimers
  1073. minetest.register_on_generated(function(minp, maxp, blockseed)
  1074. local gennotify = minetest.get_mapgen_object("gennotify")
  1075. local poslist = {}
  1076. for _, pos in ipairs(gennotify["decoration#"..gundu_eggs] or {}) do
  1077. local gundu_eggs_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  1078. table.insert(poslist, gundu_eggs_pos)
  1079. end
  1080. for _, pos in ipairs(gennotify["decoration#"..sarkamos_eggs] or {}) do
  1081. local sarkamos_eggs_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  1082. table.insert(poslist, sarkamos_eggs_pos)
  1083. end
  1084. for _, pos in ipairs(gennotify["decoration#"..impethu_eggs] or {}) do
  1085. local impethu_eggs_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  1086. table.insert(poslist, impethu_eggs_pos)
  1087. end
  1088. for _, pos in ipairs(gennotify["decoration#"..kubwakubwa_eggs] or {}) do
  1089. local kubwakubwa_eggs_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  1090. table.insert(poslist, kubwakubwa_eggs_pos)
  1091. end
  1092. for _, pos in ipairs(gennotify["decoration#"..kubwakubwa_eggs_land] or {}) do
  1093. local kubwakubwa_eggs_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  1094. table.insert(poslist, kubwakubwa_eggs_pos)
  1095. end
  1096. for _, pos in ipairs(gennotify["decoration#"..darkasthaan_eggs] or {}) do
  1097. local darkasthaan_eggs_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  1098. table.insert(poslist, darkasthaan_eggs_pos)
  1099. end
  1100. for _, pos in ipairs(gennotify["decoration#"..pegasun_eggs] or {}) do
  1101. local pegasun_eggs_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  1102. table.insert(poslist, pegasun_eggs_pos)
  1103. end
  1104. for _, pos in ipairs(gennotify["decoration#"..sneachan_eggs] or {}) do
  1105. local sneachan_eggs_pos = {x = pos.x, y = pos.y + 1, z = pos.z}
  1106. table.insert(poslist, sneachan_eggs_pos)
  1107. end
  1108. if #poslist ~= 0 then
  1109. for i = 1, #poslist do
  1110. local pos = poslist[i]
  1111. minetest.get_node_timer(pos):start(1)
  1112. end
  1113. end
  1114. end)