mapgen.lua 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479
  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_desert_stone", "default:desert_stone")
  13. minetest.register_alias("mapgen_desert_sand", "default:desert_sand")
  14. minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow")
  15. minetest.register_alias("mapgen_snowblock", "default:snowblock")
  16. minetest.register_alias("mapgen_snow", "default:snow")
  17. minetest.register_alias("mapgen_ice", "default:ice")
  18. minetest.register_alias("mapgen_sandstone", "default:sandstone")
  19. -- Flora
  20. minetest.register_alias("mapgen_tree", "default:tree")
  21. minetest.register_alias("mapgen_leaves", "default:leaves")
  22. minetest.register_alias("mapgen_apple", "default:apple")
  23. minetest.register_alias("mapgen_jungletree", "default:jungletree")
  24. minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves")
  25. minetest.register_alias("mapgen_junglegrass", "default:junglegrass")
  26. minetest.register_alias("mapgen_pine_tree", "default:pine_tree")
  27. minetest.register_alias("mapgen_pine_needles", "default:pine_needles")
  28. -- Dungeons
  29. minetest.register_alias("mapgen_cobble", "default:cobble")
  30. minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
  31. minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
  32. minetest.register_alias("mapgen_sandstonebrick", "default:sandstonebrick")
  33. minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_sandstonebrick")
  34. --
  35. -- Register ores
  36. --
  37. function default.register_ores()
  38. -- Blob ores
  39. -- These first to avoid other ores in blobs
  40. -- Clay
  41. -- This first to avoid clay in sand blobs
  42. minetest.register_ore({
  43. ore_type = "blob",
  44. ore = "default:clay",
  45. wherein = {"default:sand"},
  46. clust_scarcity = 16 * 16 * 16,
  47. clust_size = 5,
  48. y_min = -15,
  49. y_max = 0,
  50. noise_threshold = 0.0,
  51. noise_params = {
  52. offset = 0.5,
  53. scale = 0.2,
  54. spread = {x = 5, y = 5, z = 5},
  55. seed = -316,
  56. octaves = 1,
  57. persist = 0.0
  58. },
  59. })
  60. -- Sand
  61. minetest.register_ore({
  62. ore_type = "blob",
  63. ore = "default:sand",
  64. wherein = {"default:stone", "default:sandstone",
  65. "default:desert_stone"},
  66. clust_scarcity = 16 * 16 * 16,
  67. clust_size = 5,
  68. y_min = -31,
  69. y_max = 0,
  70. noise_threshold = 0.0,
  71. noise_params = {
  72. offset = 0.5,
  73. scale = 0.2,
  74. spread = {x = 5, y = 5, z = 5},
  75. seed = 2316,
  76. octaves = 1,
  77. persist = 0.0
  78. },
  79. })
  80. -- Dirt
  81. minetest.register_ore({
  82. ore_type = "blob",
  83. ore = "default:dirt",
  84. wherein = {"default:stone"},
  85. clust_scarcity = 16 * 16 * 16,
  86. clust_size = 5,
  87. y_min = -31,
  88. y_max = 31000,
  89. noise_threshold = 0.0,
  90. noise_params = {
  91. offset = 0.5,
  92. scale = 0.2,
  93. spread = {x = 5, y = 5, z = 5},
  94. seed = 17676,
  95. octaves = 1,
  96. persist = 0.0
  97. },
  98. })
  99. -- Gravel
  100. minetest.register_ore({
  101. ore_type = "blob",
  102. ore = "default:gravel",
  103. wherein = {"default:stone"},
  104. clust_scarcity = 16 * 16 * 16,
  105. clust_size = 5,
  106. y_min = -31000,
  107. y_max = 31000,
  108. noise_threshold = 0.0,
  109. noise_params = {
  110. offset = 0.5,
  111. scale = 0.2,
  112. spread = {x = 5, y = 5, z = 5},
  113. seed = 766,
  114. octaves = 1,
  115. persist = 0.0
  116. },
  117. })
  118. -- Scatter ores
  119. -- Coal
  120. minetest.register_ore({
  121. ore_type = "scatter",
  122. ore = "default:stone_with_coal",
  123. wherein = "default:stone",
  124. clust_scarcity = 8 * 8 * 8,
  125. clust_num_ores = 9,
  126. clust_size = 3,
  127. y_min = 1025,
  128. y_max = 31000,
  129. })
  130. minetest.register_ore({
  131. ore_type = "scatter",
  132. ore = "default:stone_with_coal",
  133. wherein = "default:stone",
  134. clust_scarcity = 8 * 8 * 8,
  135. clust_num_ores = 8,
  136. clust_size = 3,
  137. y_min = -31000,
  138. y_max = 64,
  139. })
  140. minetest.register_ore({
  141. ore_type = "scatter",
  142. ore = "default:stone_with_coal",
  143. wherein = "default:stone",
  144. clust_scarcity = 24 * 24 * 24,
  145. clust_num_ores = 27,
  146. clust_size = 6,
  147. y_min = -31000,
  148. y_max = 0,
  149. })
  150. -- Iron
  151. minetest.register_ore({
  152. ore_type = "scatter",
  153. ore = "default:stone_with_iron",
  154. wherein = "default:stone",
  155. clust_scarcity = 9 * 9 * 9,
  156. clust_num_ores = 12,
  157. clust_size = 3,
  158. y_min = 1025,
  159. y_max = 31000,
  160. })
  161. minetest.register_ore({
  162. ore_type = "scatter",
  163. ore = "default:stone_with_iron",
  164. wherein = "default:stone",
  165. clust_scarcity = 7 * 7 * 7,
  166. clust_num_ores = 5,
  167. clust_size = 3,
  168. y_min = -31000,
  169. y_max = 0,
  170. })
  171. minetest.register_ore({
  172. ore_type = "scatter",
  173. ore = "default:stone_with_iron",
  174. wherein = "default:stone",
  175. clust_scarcity = 24 * 24 * 24,
  176. clust_num_ores = 27,
  177. clust_size = 6,
  178. y_min = -31000,
  179. y_max = -64,
  180. })
  181. -- Copper
  182. minetest.register_ore({
  183. ore_type = "scatter",
  184. ore = "default:stone_with_copper",
  185. wherein = "default:stone",
  186. clust_scarcity = 9 * 9 * 9,
  187. clust_num_ores = 5,
  188. clust_size = 3,
  189. y_min = 1025,
  190. y_max = 31000,
  191. })
  192. minetest.register_ore({
  193. ore_type = "scatter",
  194. ore = "default:stone_with_copper",
  195. wherein = "default:stone",
  196. clust_scarcity = 12 * 12 * 12,
  197. clust_num_ores = 4,
  198. clust_size = 3,
  199. y_min = -63,
  200. y_max = -16,
  201. })
  202. minetest.register_ore({
  203. ore_type = "scatter",
  204. ore = "default:stone_with_copper",
  205. wherein = "default:stone",
  206. clust_scarcity = 9 * 9 * 9,
  207. clust_num_ores = 5,
  208. clust_size = 3,
  209. y_min = -31000,
  210. y_max = -64,
  211. })
  212. -- Gold
  213. minetest.register_ore({
  214. ore_type = "scatter",
  215. ore = "default:stone_with_gold",
  216. wherein = "default:stone",
  217. clust_scarcity = 13 * 13 * 13,
  218. clust_num_ores = 5,
  219. clust_size = 3,
  220. y_min = 1025,
  221. y_max = 31000,
  222. })
  223. minetest.register_ore({
  224. ore_type = "scatter",
  225. ore = "default:stone_with_gold",
  226. wherein = "default:stone",
  227. clust_scarcity = 15 * 15 * 15,
  228. clust_num_ores = 3,
  229. clust_size = 2,
  230. y_min = -255,
  231. y_max = -64,
  232. })
  233. minetest.register_ore({
  234. ore_type = "scatter",
  235. ore = "default:stone_with_gold",
  236. wherein = "default:stone",
  237. clust_scarcity = 13 * 13 * 13,
  238. clust_num_ores = 5,
  239. clust_size = 3,
  240. y_min = -31000,
  241. y_max = -256,
  242. })
  243. -- Mese crystal
  244. minetest.register_ore({
  245. ore_type = "scatter",
  246. ore = "default:stone_with_mese",
  247. wherein = "default:stone",
  248. clust_scarcity = 14 * 14 * 14,
  249. clust_num_ores = 5,
  250. clust_size = 3,
  251. y_min = 1025,
  252. y_max = 31000,
  253. })
  254. minetest.register_ore({
  255. ore_type = "scatter",
  256. ore = "default:stone_with_mese",
  257. wherein = "default:stone",
  258. clust_scarcity = 18 * 18 * 18,
  259. clust_num_ores = 3,
  260. clust_size = 2,
  261. y_min = -255,
  262. y_max = -64,
  263. })
  264. minetest.register_ore({
  265. ore_type = "scatter",
  266. ore = "default:stone_with_mese",
  267. wherein = "default:stone",
  268. clust_scarcity = 14 * 14 * 14,
  269. clust_num_ores = 5,
  270. clust_size = 3,
  271. y_min = -31000,
  272. y_max = -256,
  273. })
  274. -- Diamond
  275. minetest.register_ore({
  276. ore_type = "scatter",
  277. ore = "default:stone_with_diamond",
  278. wherein = "default:stone",
  279. clust_scarcity = 15 * 15 * 15,
  280. clust_num_ores = 4,
  281. clust_size = 3,
  282. y_min = 1025,
  283. y_max = 31000,
  284. })
  285. minetest.register_ore({
  286. ore_type = "scatter",
  287. ore = "default:stone_with_diamond",
  288. wherein = "default:stone",
  289. clust_scarcity = 17 * 17 * 17,
  290. clust_num_ores = 4,
  291. clust_size = 3,
  292. y_min = -255,
  293. y_max = -128,
  294. })
  295. minetest.register_ore({
  296. ore_type = "scatter",
  297. ore = "default:stone_with_diamond",
  298. wherein = "default:stone",
  299. clust_scarcity = 15 * 15 * 15,
  300. clust_num_ores = 4,
  301. clust_size = 3,
  302. y_min = -31000,
  303. y_max = -256,
  304. })
  305. -- Mese block
  306. minetest.register_ore({
  307. ore_type = "scatter",
  308. ore = "default:mese",
  309. wherein = "default:stone",
  310. clust_scarcity = 36 * 36 * 36,
  311. clust_num_ores = 3,
  312. clust_size = 2,
  313. y_min = 1025,
  314. y_max = 31000,
  315. })
  316. minetest.register_ore({
  317. ore_type = "scatter",
  318. ore = "default:mese",
  319. wherein = "default:stone",
  320. clust_scarcity = 36 * 36 * 36,
  321. clust_num_ores = 3,
  322. clust_size = 2,
  323. y_min = -31000,
  324. y_max = -1024,
  325. })
  326. end
  327. --
  328. -- Register biomes
  329. --
  330. -- All mapgens except mgv6 and singlenode
  331. function default.register_biomes()
  332. minetest.clear_registered_biomes()
  333. -- Permanent ice
  334. minetest.register_biome({
  335. name = "glacier",
  336. node_dust = "default:snowblock",
  337. node_top = "default:snowblock",
  338. depth_top = 1,
  339. node_filler = "default:snowblock",
  340. depth_filler = 3,
  341. node_stone = "default:ice",
  342. node_water_top = "default:ice",
  343. depth_water_top = 10,
  344. --node_water = "",
  345. node_river_water = "default:ice",
  346. node_riverbed = "default:gravel",
  347. depth_riverbed = 2,
  348. y_min = -8,
  349. y_max = 31000,
  350. heat_point = 0,
  351. humidity_point = 50,
  352. })
  353. minetest.register_biome({
  354. name = "glacier_ocean",
  355. node_dust = "default:snowblock",
  356. node_top = "default:sand",
  357. depth_top = 1,
  358. node_filler = "default:sand",
  359. depth_filler = 3,
  360. --node_stone = "",
  361. --node_water_top = "",
  362. --depth_water_top = ,
  363. --node_water = "",
  364. --node_river_water = "",
  365. y_min = -112,
  366. y_max = -9,
  367. heat_point = 0,
  368. humidity_point = 50,
  369. })
  370. -- Cold
  371. minetest.register_biome({
  372. name = "tundra",
  373. --node_dust = "",
  374. node_top = "default:dirt_with_snow",
  375. depth_top = 1,
  376. node_filler = "default:dirt",
  377. depth_filler = 1,
  378. --node_stone = "",
  379. --node_water_top = "",
  380. --depth_water_top = ,
  381. --node_water = "",
  382. --node_river_water = "",
  383. node_riverbed = "default:gravel",
  384. depth_riverbed = 2,
  385. y_min = 2,
  386. y_max = 31000,
  387. heat_point = 15,
  388. humidity_point = 35,
  389. })
  390. minetest.register_biome({
  391. name = "tundra_beach",
  392. --node_dust = "",
  393. node_top = "default:gravel",
  394. depth_top = 1,
  395. node_filler = "default:gravel",
  396. depth_filler = 2,
  397. --node_stone = "",
  398. --node_water_top = "",
  399. --depth_water_top = ,
  400. --node_water = "",
  401. --node_river_water = "",
  402. node_riverbed = "default:gravel",
  403. depth_riverbed = 2,
  404. y_min = -3,
  405. y_max = 1,
  406. heat_point = 15,
  407. humidity_point = 35,
  408. })
  409. minetest.register_biome({
  410. name = "tundra_ocean",
  411. --node_dust = "",
  412. node_top = "default:sand",
  413. depth_top = 1,
  414. node_filler = "default:sand",
  415. depth_filler = 3,
  416. --node_stone = "",
  417. --node_water_top = "",
  418. --depth_water_top = ,
  419. --node_water = "",
  420. --node_river_water = "",
  421. node_riverbed = "default:gravel",
  422. depth_riverbed = 2,
  423. y_min = -112,
  424. y_max = -4,
  425. heat_point = 15,
  426. humidity_point = 35,
  427. })
  428. minetest.register_biome({
  429. name = "taiga",
  430. node_dust = "default:snow",
  431. node_top = "default:dirt_with_snow",
  432. depth_top = 1,
  433. node_filler = "default:dirt",
  434. depth_filler = 3,
  435. --node_stone = "",
  436. --node_water_top = "",
  437. --depth_water_top = ,
  438. --node_water = "",
  439. --node_river_water = "",
  440. node_riverbed = "default:sand",
  441. depth_riverbed = 2,
  442. y_min = 2,
  443. y_max = 31000,
  444. heat_point = 15,
  445. humidity_point = 65,
  446. })
  447. minetest.register_biome({
  448. name = "taiga_ocean",
  449. --node_dust = "",
  450. node_top = "default:sand",
  451. depth_top = 1,
  452. node_filler = "default:sand",
  453. depth_filler = 3,
  454. --node_stone = "",
  455. --node_water_top = "",
  456. --depth_water_top = ,
  457. --node_water = "",
  458. --node_river_water = "",
  459. node_riverbed = "default:sand",
  460. depth_riverbed = 2,
  461. y_min = -112,
  462. y_max = 1,
  463. heat_point = 15,
  464. humidity_point = 65,
  465. })
  466. -- Temperate
  467. minetest.register_biome({
  468. name = "stone_grassland",
  469. --node_dust = "",
  470. node_top = "default:dirt_with_grass",
  471. depth_top = 1,
  472. node_filler = "default:dirt",
  473. depth_filler = 1,
  474. --node_stone = "",
  475. --node_water_top = "",
  476. --depth_water_top = ,
  477. --node_water = "",
  478. --node_river_water = "",
  479. node_riverbed = "default:sand",
  480. depth_riverbed = 2,
  481. y_min = 6,
  482. y_max = 31000,
  483. heat_point = 40,
  484. humidity_point = 35,
  485. })
  486. minetest.register_biome({
  487. name = "stone_grassland_dunes",
  488. --node_dust = "",
  489. node_top = "default:sand",
  490. depth_top = 1,
  491. node_filler = "default:sand",
  492. depth_filler = 2,
  493. --node_stone = "",
  494. --node_water_top = "",
  495. --depth_water_top = ,
  496. --node_water = "",
  497. --node_river_water = "",
  498. node_riverbed = "default:sand",
  499. depth_riverbed = 2,
  500. y_min = 5,
  501. y_max = 5,
  502. heat_point = 40,
  503. humidity_point = 35,
  504. })
  505. minetest.register_biome({
  506. name = "stone_grassland_ocean",
  507. --node_dust = "",
  508. node_top = "default:sand",
  509. depth_top = 1,
  510. node_filler = "default:sand",
  511. depth_filler = 3,
  512. --node_stone = "",
  513. --node_water_top = "",
  514. --depth_water_top = ,
  515. --node_water = "",
  516. --node_river_water = "",
  517. node_riverbed = "default:sand",
  518. depth_riverbed = 2,
  519. y_min = -112,
  520. y_max = 4,
  521. heat_point = 40,
  522. humidity_point = 35,
  523. })
  524. minetest.register_biome({
  525. name = "coniferous_forest",
  526. --node_dust = "",
  527. node_top = "default:dirt_with_grass",
  528. depth_top = 1,
  529. node_filler = "default:dirt",
  530. depth_filler = 3,
  531. --node_stone = "",
  532. --node_water_top = "",
  533. --depth_water_top = ,
  534. --node_water = "",
  535. --node_river_water = "",
  536. node_riverbed = "default:sand",
  537. depth_riverbed = 2,
  538. y_min = 6,
  539. y_max = 31000,
  540. heat_point = 40,
  541. humidity_point = 65,
  542. })
  543. minetest.register_biome({
  544. name = "coniferous_forest_dunes",
  545. --node_dust = "",
  546. node_top = "default:sand",
  547. depth_top = 1,
  548. node_filler = "default:sand",
  549. depth_filler = 3,
  550. --node_stone = "",
  551. --node_water_top = "",
  552. --depth_water_top = ,
  553. --node_water = "",
  554. --node_river_water = "",
  555. node_riverbed = "default:sand",
  556. depth_riverbed = 2,
  557. y_min = 5,
  558. y_max = 5,
  559. heat_point = 40,
  560. humidity_point = 65,
  561. })
  562. minetest.register_biome({
  563. name = "coniferous_forest_ocean",
  564. --node_dust = "",
  565. node_top = "default:sand",
  566. depth_top = 1,
  567. node_filler = "default:sand",
  568. depth_filler = 3,
  569. --node_stone = "",
  570. --node_water_top = "",
  571. --depth_water_top = ,
  572. --node_water = "",
  573. --node_river_water = "",
  574. node_riverbed = "default:sand",
  575. depth_riverbed = 2,
  576. y_min = -112,
  577. y_max = 4,
  578. heat_point = 40,
  579. humidity_point = 65,
  580. })
  581. minetest.register_biome({
  582. name = "sandstone_grassland",
  583. --node_dust = "",
  584. node_top = "default:dirt_with_grass",
  585. depth_top = 1,
  586. node_filler = "default:dirt",
  587. depth_filler = 1,
  588. node_stone = "default:sandstone",
  589. --node_water_top = "",
  590. --depth_water_top = ,
  591. --node_water = "",
  592. --node_river_water = "",
  593. node_riverbed = "default:sand",
  594. depth_riverbed = 2,
  595. y_min = 6,
  596. y_max = 31000,
  597. heat_point = 60,
  598. humidity_point = 35,
  599. })
  600. minetest.register_biome({
  601. name = "sandstone_grassland_dunes",
  602. --node_dust = "",
  603. node_top = "default:sand",
  604. depth_top = 1,
  605. node_filler = "default:sand",
  606. depth_filler = 2,
  607. node_stone = "default:sandstone",
  608. --node_water_top = "",
  609. --depth_water_top = ,
  610. --node_water = "",
  611. --node_river_water = "",
  612. node_riverbed = "default:sand",
  613. depth_riverbed = 2,
  614. y_min = 5,
  615. y_max = 5,
  616. heat_point = 60,
  617. humidity_point = 35,
  618. })
  619. minetest.register_biome({
  620. name = "sandstone_grassland_ocean",
  621. --node_dust = "",
  622. node_top = "default:sand",
  623. depth_top = 1,
  624. node_filler = "default:sand",
  625. depth_filler = 3,
  626. node_stone = "default:sandstone",
  627. --node_water_top = "",
  628. --depth_water_top = ,
  629. --node_water = "",
  630. --node_river_water = "",
  631. node_riverbed = "default:sand",
  632. depth_riverbed = 2,
  633. y_min = -112,
  634. y_max = 4,
  635. heat_point = 60,
  636. humidity_point = 35,
  637. })
  638. minetest.register_biome({
  639. name = "deciduous_forest",
  640. --node_dust = "",
  641. node_top = "default:dirt_with_grass",
  642. depth_top = 1,
  643. node_filler = "default:dirt",
  644. depth_filler = 3,
  645. --node_stone = "",
  646. --node_water_top = "",
  647. --depth_water_top = ,
  648. --node_water = "",
  649. --node_river_water = "",
  650. node_riverbed = "default:sand",
  651. depth_riverbed = 2,
  652. y_min = 1,
  653. y_max = 31000,
  654. heat_point = 60,
  655. humidity_point = 65,
  656. })
  657. minetest.register_biome({
  658. name = "deciduous_forest_swamp",
  659. --node_dust = "",
  660. node_top = "default:dirt",
  661. depth_top = 1,
  662. node_filler = "default:dirt",
  663. depth_filler = 3,
  664. --node_stone = "",
  665. --node_water_top = "",
  666. --depth_water_top = ,
  667. --node_water = "",
  668. --node_river_water = "",
  669. node_riverbed = "default:sand",
  670. depth_riverbed = 2,
  671. y_min = -3,
  672. y_max = 0,
  673. heat_point = 60,
  674. humidity_point = 65,
  675. })
  676. minetest.register_biome({
  677. name = "deciduous_forest_ocean",
  678. --node_dust = "",
  679. node_top = "default:sand",
  680. depth_top = 1,
  681. node_filler = "default:sand",
  682. depth_filler = 3,
  683. --node_stone = "",
  684. --node_water_top = "",
  685. --depth_water_top = ,
  686. --node_water = "",
  687. --node_river_water = "",
  688. node_riverbed = "default:sand",
  689. depth_riverbed = 2,
  690. y_min = -112,
  691. y_max = -4,
  692. heat_point = 60,
  693. humidity_point = 65,
  694. })
  695. -- Hot
  696. minetest.register_biome({
  697. name = "desert",
  698. --node_dust = "",
  699. node_top = "default:desert_sand",
  700. depth_top = 1,
  701. node_filler = "default:desert_sand",
  702. depth_filler = 1,
  703. node_stone = "default:desert_stone",
  704. --node_water_top = "",
  705. --depth_water_top = ,
  706. --node_water = "",
  707. --node_river_water = "",
  708. node_riverbed = "default:sand",
  709. depth_riverbed = 2,
  710. y_min = 5,
  711. y_max = 31000,
  712. heat_point = 85,
  713. humidity_point = 20,
  714. })
  715. minetest.register_biome({
  716. name = "desert_ocean",
  717. --node_dust = "",
  718. node_top = "default:sand",
  719. depth_top = 1,
  720. node_filler = "default:sand",
  721. depth_filler = 3,
  722. node_stone = "default:desert_stone",
  723. --node_water_top = "",
  724. --depth_water_top = ,
  725. --node_water = "",
  726. --node_river_water = "",
  727. node_riverbed = "default:sand",
  728. depth_riverbed = 2,
  729. y_min = -112,
  730. y_max = 4,
  731. heat_point = 85,
  732. humidity_point = 20,
  733. })
  734. minetest.register_biome({
  735. name = "savanna",
  736. --node_dust = "",
  737. node_top = "default:dirt_with_dry_grass",
  738. depth_top = 1,
  739. node_filler = "default:dirt",
  740. depth_filler = 1,
  741. --node_stone = "",
  742. --node_water_top = "",
  743. --depth_water_top = ,
  744. --node_water = "",
  745. --node_river_water = "",
  746. node_riverbed = "default:sand",
  747. depth_riverbed = 2,
  748. y_min = 1,
  749. y_max = 31000,
  750. heat_point = 85,
  751. humidity_point = 50,
  752. })
  753. minetest.register_biome({
  754. name = "savanna_swamp",
  755. --node_dust = "",
  756. node_top = "default:dirt",
  757. depth_top = 1,
  758. node_filler = "default:dirt",
  759. depth_filler = 3,
  760. --node_stone = "",
  761. --node_water_top = "",
  762. --depth_water_top = ,
  763. --node_water = "",
  764. --node_river_water = "",
  765. node_riverbed = "default:sand",
  766. depth_riverbed = 2,
  767. y_min = -3,
  768. y_max = 0,
  769. heat_point = 85,
  770. humidity_point = 50,
  771. })
  772. minetest.register_biome({
  773. name = "savanna_ocean",
  774. --node_dust = "",
  775. node_top = "default:sand",
  776. depth_top = 1,
  777. node_filler = "default:sand",
  778. depth_filler = 3,
  779. --node_stone = "",
  780. --node_water_top = "",
  781. --depth_water_top = ,
  782. --node_water = "",
  783. --node_river_water = "",
  784. node_riverbed = "default:sand",
  785. depth_riverbed = 2,
  786. y_min = -112,
  787. y_max = -4,
  788. heat_point = 85,
  789. humidity_point = 50,
  790. })
  791. minetest.register_biome({
  792. name = "rainforest",
  793. --node_dust = "",
  794. node_top = "default:dirt_with_grass",
  795. depth_top = 1,
  796. node_filler = "default:dirt",
  797. depth_filler = 3,
  798. --node_stone = "",
  799. --node_water_top = "",
  800. --depth_water_top = ,
  801. --node_water = "",
  802. --node_river_water = "",
  803. node_riverbed = "default:sand",
  804. depth_riverbed = 2,
  805. y_min = 1,
  806. y_max = 31000,
  807. heat_point = 85,
  808. humidity_point = 80,
  809. })
  810. minetest.register_biome({
  811. name = "rainforest_swamp",
  812. --node_dust = "",
  813. node_top = "default:dirt",
  814. depth_top = 1,
  815. node_filler = "default:dirt",
  816. depth_filler = 3,
  817. --node_stone = "",
  818. --node_water_top = "",
  819. --depth_water_top = ,
  820. --node_water = "",
  821. --node_river_water = "",
  822. node_riverbed = "default:sand",
  823. depth_riverbed = 2,
  824. y_min = -3,
  825. y_max = 0,
  826. heat_point = 85,
  827. humidity_point = 80,
  828. })
  829. minetest.register_biome({
  830. name = "rainforest_ocean",
  831. --node_dust = "",
  832. node_top = "default:sand",
  833. depth_top = 1,
  834. node_filler = "default:sand",
  835. depth_filler = 3,
  836. --node_stone = "",
  837. --node_water_top = "",
  838. --depth_water_top = ,
  839. --node_water = "",
  840. --node_river_water = "",
  841. node_riverbed = "default:sand",
  842. depth_riverbed = 2,
  843. y_min = -112,
  844. y_max = -4,
  845. heat_point = 85,
  846. humidity_point = 80,
  847. })
  848. -- Underground
  849. minetest.register_biome({
  850. name = "underground",
  851. --node_dust = "",
  852. --node_top = "",
  853. --depth_top = ,
  854. --node_filler = "",
  855. --depth_filler = ,
  856. --node_stone = "",
  857. --node_water_top = "",
  858. --depth_water_top = ,
  859. --node_water = "",
  860. --node_river_water = "",
  861. y_min = -31000,
  862. y_max = -113,
  863. heat_point = 50,
  864. humidity_point = 50,
  865. })
  866. end
  867. --
  868. -- Register decorations
  869. --
  870. -- Mgv6
  871. function default.register_mgv6_decorations()
  872. minetest.clear_registered_decorations()
  873. -- Papyrus
  874. minetest.register_decoration({
  875. deco_type = "simple",
  876. place_on = {"default:dirt_with_grass"},
  877. sidelen = 16,
  878. noise_params = {
  879. offset = -0.3,
  880. scale = 0.7,
  881. spread = {x = 100, y = 100, z = 100},
  882. seed = 354,
  883. octaves = 3,
  884. persist = 0.7
  885. },
  886. y_min = 1,
  887. y_max = 1,
  888. decoration = "default:papyrus",
  889. height = 2,
  890. height_max = 4,
  891. spawn_by = "default:water_source",
  892. num_spawn_by = 1,
  893. })
  894. -- Cacti
  895. minetest.register_decoration({
  896. deco_type = "simple",
  897. place_on = {"default:desert_sand"},
  898. sidelen = 16,
  899. noise_params = {
  900. offset = -0.012,
  901. scale = 0.024,
  902. spread = {x = 100, y = 100, z = 100},
  903. seed = 230,
  904. octaves = 3,
  905. persist = 0.6
  906. },
  907. y_min = 1,
  908. y_max = 30,
  909. decoration = "default:cactus",
  910. height = 3,
  911. height_max = 4,
  912. })
  913. -- Long grasses
  914. for length = 1, 5 do
  915. minetest.register_decoration({
  916. deco_type = "simple",
  917. place_on = {"default:dirt_with_grass"},
  918. sidelen = 16,
  919. noise_params = {
  920. offset = 0,
  921. scale = 0.007,
  922. spread = {x = 100, y = 100, z = 100},
  923. seed = 329,
  924. octaves = 3,
  925. persist = 0.6
  926. },
  927. y_min = 1,
  928. y_max = 30,
  929. decoration = "default:grass_"..length,
  930. })
  931. end
  932. -- Dry shrubs
  933. minetest.register_decoration({
  934. deco_type = "simple",
  935. place_on = {"default:desert_sand", "default:dirt_with_snow"},
  936. sidelen = 16,
  937. noise_params = {
  938. offset = 0,
  939. scale = 0.035,
  940. spread = {x = 100, y = 100, z = 100},
  941. seed = 329,
  942. octaves = 3,
  943. persist = 0.6
  944. },
  945. y_min = 1,
  946. y_max = 30,
  947. decoration = "default:dry_shrub",
  948. })
  949. end
  950. -- All mapgens except mgv6 and singlenode
  951. local function register_grass_decoration(offset, scale, length)
  952. minetest.register_decoration({
  953. deco_type = "simple",
  954. place_on = {"default:dirt_with_grass", "default:sand"},
  955. sidelen = 16,
  956. noise_params = {
  957. offset = offset,
  958. scale = scale,
  959. spread = {x = 200, y = 200, z = 200},
  960. seed = 329,
  961. octaves = 3,
  962. persist = 0.6
  963. },
  964. biomes = {"stone_grassland", "sandstone_grassland",
  965. "deciduous_forest", "coniferous_forest",
  966. "stone_grassland_dunes", "sandstone_grassland_dunes",
  967. "coniferous_forest_dunes"},
  968. y_min = 1,
  969. y_max = 31000,
  970. decoration = "default:grass_"..length,
  971. })
  972. end
  973. local function register_dry_grass_decoration(offset, scale, length)
  974. minetest.register_decoration({
  975. deco_type = "simple",
  976. place_on = {"default:dirt_with_dry_grass"},
  977. sidelen = 16,
  978. noise_params = {
  979. offset = offset,
  980. scale = scale,
  981. spread = {x = 200, y = 200, z = 200},
  982. seed = 329,
  983. octaves = 3,
  984. persist = 0.6
  985. },
  986. biomes = {"savanna"},
  987. y_min = 1,
  988. y_max = 31000,
  989. decoration = "default:dry_grass_"..length,
  990. })
  991. end
  992. function default.register_decorations()
  993. minetest.clear_registered_decorations()
  994. -- Apple tree and log
  995. minetest.register_decoration({
  996. deco_type = "schematic",
  997. place_on = {"default:dirt_with_grass"},
  998. sidelen = 16,
  999. noise_params = {
  1000. offset = 0.036,
  1001. scale = 0.022,
  1002. spread = {x = 250, y = 250, z = 250},
  1003. seed = 2,
  1004. octaves = 3,
  1005. persist = 0.66
  1006. },
  1007. biomes = {"deciduous_forest"},
  1008. y_min = 1,
  1009. y_max = 31000,
  1010. schematic = minetest.get_modpath("default").."/schematics/apple_tree.mts",
  1011. flags = "place_center_x, place_center_z",
  1012. })
  1013. minetest.register_decoration({
  1014. deco_type = "schematic",
  1015. place_on = {"default:dirt_with_grass"},
  1016. sidelen = 16,
  1017. noise_params = {
  1018. offset = 0.0018,
  1019. scale = 0.0011,
  1020. spread = {x = 250, y = 250, z = 250},
  1021. seed = 2,
  1022. octaves = 3,
  1023. persist = 0.66
  1024. },
  1025. biomes = {"deciduous_forest"},
  1026. y_min = 1,
  1027. y_max = 31000,
  1028. schematic = {
  1029. size = {x = 3, y = 3, z = 1},
  1030. data = {
  1031. {name = "air", prob = 0},
  1032. {name = "air", prob = 0},
  1033. {name = "air", prob = 0},
  1034. {name = "default:tree", param2 = 12, prob = 191},
  1035. {name = "default:tree", param2 = 12},
  1036. {name = "default:tree", param2 = 12, prob = 127},
  1037. {name = "air", prob = 0},
  1038. {name = "flowers:mushroom_brown", prob = 63},
  1039. {name = "air", prob = 0},
  1040. },
  1041. },
  1042. flags = "place_center_x",
  1043. rotation = "random",
  1044. })
  1045. -- Jungle tree and log
  1046. minetest.register_decoration({
  1047. deco_type = "schematic",
  1048. place_on = {"default:dirt_with_grass", "default:dirt"},
  1049. sidelen = 80,
  1050. fill_ratio = 0.1,
  1051. biomes = {"rainforest", "rainforest_swamp"},
  1052. y_min = 0,
  1053. y_max = 31000,
  1054. schematic = minetest.get_modpath("default").."/schematics/jungle_tree.mts",
  1055. flags = "place_center_x, place_center_z",
  1056. rotation = "random",
  1057. })
  1058. minetest.register_decoration({
  1059. deco_type = "schematic",
  1060. place_on = {"default:dirt_with_grass", "default:dirt"},
  1061. sidelen = 80,
  1062. fill_ratio = 0.005,
  1063. biomes = {"rainforest", "rainforest_swamp"},
  1064. y_min = 1,
  1065. y_max = 31000,
  1066. schematic = {
  1067. size = {x = 3, y = 3, z = 1},
  1068. data = {
  1069. {name = "air", prob = 0},
  1070. {name = "air", prob = 0},
  1071. {name = "air", prob = 0},
  1072. {name = "default:jungletree", param2 = 12, prob = 191},
  1073. {name = "default:jungletree", param2 = 12},
  1074. {name = "default:jungletree", param2 = 12, prob = 127},
  1075. {name = "air", prob = 0},
  1076. {name = "flowers:mushroom_brown", prob = 127},
  1077. {name = "air", prob = 0},
  1078. },
  1079. },
  1080. flags = "place_center_x",
  1081. rotation = "random",
  1082. })
  1083. -- Taiga and temperate coniferous forest pine tree and log
  1084. minetest.register_decoration({
  1085. deco_type = "schematic",
  1086. place_on = {"default:dirt_with_snow", "default:dirt_with_grass"},
  1087. sidelen = 16,
  1088. noise_params = {
  1089. offset = 0.036,
  1090. scale = 0.022,
  1091. spread = {x = 250, y = 250, z = 250},
  1092. seed = 2,
  1093. octaves = 3,
  1094. persist = 0.66
  1095. },
  1096. biomes = {"taiga", "coniferous_forest"},
  1097. y_min = 2,
  1098. y_max = 31000,
  1099. schematic = minetest.get_modpath("default").."/schematics/pine_tree.mts",
  1100. flags = "place_center_x, place_center_z",
  1101. })
  1102. minetest.register_decoration({
  1103. deco_type = "schematic",
  1104. place_on = {"default:dirt_with_snow", "default:dirt_with_grass"},
  1105. sidelen = 80,
  1106. noise_params = {
  1107. offset = 0.0018,
  1108. scale = 0.0011,
  1109. spread = {x = 250, y = 250, z = 250},
  1110. seed = 2,
  1111. octaves = 3,
  1112. persist = 0.66
  1113. },
  1114. biomes = {"taiga", "coniferous_forest"},
  1115. y_min = 1,
  1116. y_max = 31000,
  1117. schematic = {
  1118. size = {x = 3, y = 3, z = 1},
  1119. data = {
  1120. {name = "air", prob = 0},
  1121. {name = "air", prob = 0},
  1122. {name = "air", prob = 0},
  1123. {name = "default:pine_tree", param2 = 12, prob = 191},
  1124. {name = "default:pine_tree", param2 = 12},
  1125. {name = "default:pine_tree", param2 = 12, prob = 127},
  1126. {name = "air", prob = 0},
  1127. {name = "flowers:mushroom_red", prob = 63},
  1128. {name = "air", prob = 0},
  1129. },
  1130. },
  1131. flags = "place_center_x",
  1132. rotation = "random",
  1133. })
  1134. -- Acacia tree and log
  1135. minetest.register_decoration({
  1136. deco_type = "schematic",
  1137. place_on = {"default:dirt_with_dry_grass"},
  1138. sidelen = 16,
  1139. noise_params = {
  1140. offset = 0,
  1141. scale = 0.002,
  1142. spread = {x = 250, y = 250, z = 250},
  1143. seed = 2,
  1144. octaves = 3,
  1145. persist = 0.66
  1146. },
  1147. biomes = {"savanna"},
  1148. y_min = 1,
  1149. y_max = 31000,
  1150. schematic = minetest.get_modpath("default").."/schematics/acacia_tree.mts",
  1151. flags = "place_center_x, place_center_z",
  1152. rotation = "random",
  1153. })
  1154. minetest.register_decoration({
  1155. deco_type = "schematic",
  1156. place_on = {"default:dirt_with_dry_grass"},
  1157. sidelen = 16,
  1158. noise_params = {
  1159. offset = 0,
  1160. scale = 0.001,
  1161. spread = {x = 250, y = 250, z = 250},
  1162. seed = 2,
  1163. octaves = 3,
  1164. persist = 0.66
  1165. },
  1166. biomes = {"savanna"},
  1167. y_min = 1,
  1168. y_max = 31000,
  1169. schematic = {
  1170. size = {x = 3, y = 2, z = 1},
  1171. data = {
  1172. {name = "air", prob = 0},
  1173. {name = "air", prob = 0},
  1174. {name = "air", prob = 0},
  1175. {name = "default:acacia_tree", param2 = 12, prob = 191},
  1176. {name = "default:acacia_tree", param2 = 12},
  1177. {name = "default:acacia_tree", param2 = 12, prob = 127},
  1178. },
  1179. },
  1180. flags = "place_center_x",
  1181. rotation = "random",
  1182. })
  1183. -- Aspen tree and log
  1184. minetest.register_decoration({
  1185. deco_type = "schematic",
  1186. place_on = {"default:dirt_with_grass"},
  1187. sidelen = 16,
  1188. noise_params = {
  1189. offset = 0.0,
  1190. scale = -0.015,
  1191. spread = {x = 250, y = 250, z = 250},
  1192. seed = 2,
  1193. octaves = 3,
  1194. persist = 0.66
  1195. },
  1196. biomes = {"deciduous_forest"},
  1197. y_min = 1,
  1198. y_max = 31000,
  1199. schematic = minetest.get_modpath("default").."/schematics/aspen_tree.mts",
  1200. flags = "place_center_x, place_center_z",
  1201. })
  1202. minetest.register_decoration({
  1203. deco_type = "schematic",
  1204. place_on = {"default:dirt_with_grass"},
  1205. sidelen = 16,
  1206. noise_params = {
  1207. offset = 0.0,
  1208. scale = -0.0008,
  1209. spread = {x = 250, y = 250, z = 250},
  1210. seed = 2,
  1211. octaves = 3,
  1212. persist = 0.66
  1213. },
  1214. biomes = {"deciduous_forest"},
  1215. y_min = 1,
  1216. y_max = 31000,
  1217. schematic = {
  1218. size = {x = 3, y = 3, z = 1},
  1219. data = {
  1220. {name = "air", prob = 0},
  1221. {name = "air", prob = 0},
  1222. {name = "air", prob = 0},
  1223. {name = "default:aspen_tree", param2 = 12},
  1224. {name = "default:aspen_tree", param2 = 12},
  1225. {name = "default:aspen_tree", param2 = 12, prob = 127},
  1226. {name = "flowers:mushroom_red", prob = 63},
  1227. {name = "flowers:mushroom_brown", prob = 63},
  1228. {name = "air", prob = 0},
  1229. },
  1230. },
  1231. flags = "place_center_x",
  1232. rotation = "random",
  1233. })
  1234. -- Large cactus
  1235. minetest.register_decoration({
  1236. deco_type = "schematic",
  1237. place_on = {"default:desert_sand"},
  1238. sidelen = 16,
  1239. noise_params = {
  1240. offset = -0.0003,
  1241. scale = 0.0009,
  1242. spread = {x = 200, y = 200, z = 200},
  1243. seed = 230,
  1244. octaves = 3,
  1245. persist = 0.6
  1246. },
  1247. biomes = {"desert"},
  1248. y_min = 5,
  1249. y_max = 31000,
  1250. schematic = minetest.get_modpath("default").."/schematics/large_cactus.mts",
  1251. flags = "place_center_x",
  1252. rotation = "random",
  1253. })
  1254. -- Cactus
  1255. minetest.register_decoration({
  1256. deco_type = "simple",
  1257. place_on = {"default:desert_sand"},
  1258. sidelen = 16,
  1259. noise_params = {
  1260. offset = -0.0003,
  1261. scale = 0.0009,
  1262. spread = {x = 200, y = 200, z = 200},
  1263. seed = 230,
  1264. octaves = 3,
  1265. persist = 0.6
  1266. },
  1267. biomes = {"desert"},
  1268. y_min = 5,
  1269. y_max = 31000,
  1270. decoration = "default:cactus",
  1271. height = 2,
  1272. height_max = 5,
  1273. })
  1274. -- Papyrus
  1275. minetest.register_decoration({
  1276. deco_type = "schematic",
  1277. place_on = {"default:dirt"},
  1278. sidelen = 16,
  1279. noise_params = {
  1280. offset = -0.3,
  1281. scale = 0.7,
  1282. spread = {x = 200, y = 200, z = 200},
  1283. seed = 354,
  1284. octaves = 3,
  1285. persist = 0.7
  1286. },
  1287. biomes = {"savanna_swamp"},
  1288. y_min = 0,
  1289. y_max = 0,
  1290. schematic = minetest.get_modpath("default").."/schematics/papyrus.mts",
  1291. })
  1292. -- Grasses
  1293. register_grass_decoration(-0.03, 0.09, 5)
  1294. register_grass_decoration(-0.015, 0.075, 4)
  1295. register_grass_decoration(0, 0.06, 3)
  1296. register_grass_decoration(0.015, 0.045, 2)
  1297. register_grass_decoration(0.03, 0.03, 1)
  1298. -- Dry grasses
  1299. register_dry_grass_decoration(0.01, 0.05, 5)
  1300. register_dry_grass_decoration(0.03, 0.03, 4)
  1301. register_dry_grass_decoration(0.05, 0.01, 3)
  1302. register_dry_grass_decoration(0.07, -0.01, 2)
  1303. register_dry_grass_decoration(0.09, -0.03, 1)
  1304. -- Junglegrass
  1305. minetest.register_decoration({
  1306. deco_type = "simple",
  1307. place_on = {"default:dirt_with_grass"},
  1308. sidelen = 80,
  1309. fill_ratio = 0.1,
  1310. biomes = {"rainforest"},
  1311. y_min = 1,
  1312. y_max = 31000,
  1313. decoration = "default:junglegrass",
  1314. })
  1315. -- Dry shrub
  1316. minetest.register_decoration({
  1317. deco_type = "simple",
  1318. place_on = {"default:desert_sand", "default:dirt_with_snow"},
  1319. sidelen = 16,
  1320. noise_params = {
  1321. offset = 0,
  1322. scale = 0.02,
  1323. spread = {x = 200, y = 200, z = 200},
  1324. seed = 329,
  1325. octaves = 3,
  1326. persist = 0.6
  1327. },
  1328. biomes = {"desert", "tundra"},
  1329. y_min = 2,
  1330. y_max = 31000,
  1331. decoration = "default:dry_shrub",
  1332. })
  1333. end
  1334. --
  1335. -- Detect mapgen to select functions
  1336. --
  1337. local mg_name = minetest.get_mapgen_setting("mg_name")
  1338. if mg_name == "v6" then
  1339. default.register_ores()
  1340. default.register_mgv6_decorations()
  1341. else
  1342. default.register_biomes()
  1343. default.register_ores()
  1344. default.register_decorations()
  1345. end