crafting.lua 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. -- mods/default/crafting.lua
  2. minetest.register_craft({
  3. output = "default:wood 4",
  4. recipe = {
  5. {"default:tree"},
  6. }
  7. })
  8. minetest.register_craft({
  9. output = "default:junglewood 4",
  10. recipe = {
  11. {"default:jungletree"},
  12. }
  13. })
  14. minetest.register_craft({
  15. output = "default:pine_wood 4",
  16. recipe = {
  17. {"default:pine_tree"},
  18. }
  19. })
  20. minetest.register_craft({
  21. output = "default:acacia_wood 4",
  22. recipe = {
  23. {"default:acacia_tree"},
  24. }
  25. })
  26. minetest.register_craft({
  27. output = "default:aspen_wood 4",
  28. recipe = {
  29. {"default:aspen_tree"},
  30. }
  31. })
  32. minetest.register_craft({
  33. output = "default:wood",
  34. recipe = {
  35. {"default:bush_stem"},
  36. }
  37. })
  38. minetest.register_craft({
  39. output = "default:acacia_wood",
  40. recipe = {
  41. {"default:acacia_bush_stem"},
  42. }
  43. })
  44. minetest.register_craft({
  45. output = "default:pine_wood",
  46. recipe = {
  47. {"default:pine_bush_stem"},
  48. }
  49. })
  50. minetest.register_craft({
  51. output = "default:sign_wall_steel 3",
  52. recipe = {
  53. {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
  54. {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
  55. {"", "group:stick", ""},
  56. }
  57. })
  58. minetest.register_craft({
  59. output = "default:sign_wall_wood 3",
  60. recipe = {
  61. {"group:wood", "group:wood", "group:wood"},
  62. {"group:wood", "group:wood", "group:wood"},
  63. {"", "group:stick", ""},
  64. }
  65. })
  66. minetest.register_craft({
  67. output = "default:coalblock",
  68. recipe = {
  69. {"default:coal_lump", "default:coal_lump", "default:coal_lump"},
  70. {"default:coal_lump", "default:coal_lump", "default:coal_lump"},
  71. {"default:coal_lump", "default:coal_lump", "default:coal_lump"},
  72. }
  73. })
  74. minetest.register_craft({
  75. output = "default:steelblock",
  76. recipe = {
  77. {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
  78. {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
  79. {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
  80. }
  81. })
  82. minetest.register_craft({
  83. output = "default:copperblock",
  84. recipe = {
  85. {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
  86. {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
  87. {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
  88. }
  89. })
  90. minetest.register_craft({
  91. output = "default:tinblock",
  92. recipe = {
  93. {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"},
  94. {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"},
  95. {"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"},
  96. }
  97. })
  98. minetest.register_craft({
  99. output = "default:bronzeblock",
  100. recipe = {
  101. {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
  102. {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
  103. {"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
  104. }
  105. })
  106. minetest.register_craft({
  107. output = "default:bronze_ingot 9",
  108. recipe = {
  109. {"default:bronzeblock"},
  110. }
  111. })
  112. minetest.register_craft({
  113. output = "default:goldblock",
  114. recipe = {
  115. {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"},
  116. {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"},
  117. {"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"},
  118. }
  119. })
  120. minetest.register_craft({
  121. output = "default:diamondblock",
  122. recipe = {
  123. {"default:diamond", "default:diamond", "default:diamond"},
  124. {"default:diamond", "default:diamond", "default:diamond"},
  125. {"default:diamond", "default:diamond", "default:diamond"},
  126. }
  127. })
  128. minetest.register_craft({
  129. output = "default:sandstone",
  130. recipe = {
  131. {"default:sand", "default:sand"},
  132. {"default:sand", "default:sand"},
  133. }
  134. })
  135. minetest.register_craft({
  136. output = "default:sand 4",
  137. recipe = {
  138. {"default:sandstone"},
  139. }
  140. })
  141. minetest.register_craft({
  142. output = "default:sandstonebrick 4",
  143. recipe = {
  144. {"default:sandstone", "default:sandstone"},
  145. {"default:sandstone", "default:sandstone"},
  146. }
  147. })
  148. minetest.register_craft({
  149. output = "default:sandstone_block 9",
  150. recipe = {
  151. {"default:sandstone", "default:sandstone", "default:sandstone"},
  152. {"default:sandstone", "default:sandstone", "default:sandstone"},
  153. {"default:sandstone", "default:sandstone", "default:sandstone"},
  154. }
  155. })
  156. minetest.register_craft({
  157. output = "default:desert_sandstone",
  158. recipe = {
  159. {"default:desert_sand", "default:desert_sand"},
  160. {"default:desert_sand", "default:desert_sand"},
  161. }
  162. })
  163. minetest.register_craft({
  164. output = "default:desert_sand 4",
  165. recipe = {
  166. {"default:desert_sandstone"},
  167. }
  168. })
  169. minetest.register_craft({
  170. output = "default:desert_sandstone_brick 4",
  171. recipe = {
  172. {"default:desert_sandstone", "default:desert_sandstone"},
  173. {"default:desert_sandstone", "default:desert_sandstone"},
  174. }
  175. })
  176. minetest.register_craft({
  177. output = "default:desert_sandstone_block 9",
  178. recipe = {
  179. {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"},
  180. {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"},
  181. {"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"},
  182. }
  183. })
  184. minetest.register_craft({
  185. output = "default:silver_sandstone",
  186. recipe = {
  187. {"default:silver_sand", "default:silver_sand"},
  188. {"default:silver_sand", "default:silver_sand"},
  189. }
  190. })
  191. minetest.register_craft({
  192. output = "default:silver_sand 4",
  193. recipe = {
  194. {"default:silver_sandstone"},
  195. }
  196. })
  197. minetest.register_craft({
  198. output = "default:silver_sandstone_brick 4",
  199. recipe = {
  200. {"default:silver_sandstone", "default:silver_sandstone"},
  201. {"default:silver_sandstone", "default:silver_sandstone"},
  202. }
  203. })
  204. minetest.register_craft({
  205. output = "default:silver_sandstone_block 9",
  206. recipe = {
  207. {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"},
  208. {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"},
  209. {"default:silver_sandstone", "default:silver_sandstone", "default:silver_sandstone"},
  210. }
  211. })
  212. minetest.register_craft({
  213. output = "default:clay",
  214. recipe = {
  215. {"default:clay_lump", "default:clay_lump"},
  216. {"default:clay_lump", "default:clay_lump"},
  217. }
  218. })
  219. minetest.register_craft({
  220. output = "default:brick",
  221. recipe = {
  222. {"default:clay_brick", "default:clay_brick"},
  223. {"default:clay_brick", "default:clay_brick"},
  224. }
  225. })
  226. minetest.register_craft({
  227. output = "default:bookshelf",
  228. recipe = {
  229. {"group:wood", "group:wood", "group:wood"},
  230. {"default:book", "default:book", "default:book"},
  231. {"group:wood", "group:wood", "group:wood"},
  232. }
  233. })
  234. minetest.register_craft({
  235. output = "default:ladder_wood 5",
  236. recipe = {
  237. {"group:stick", "", "group:stick"},
  238. {"group:stick", "group:stick", "group:stick"},
  239. {"group:stick", "", "group:stick"},
  240. }
  241. })
  242. minetest.register_craft({
  243. output = "default:ladder_steel 15",
  244. recipe = {
  245. {"default:steel_ingot", "", "default:steel_ingot"},
  246. {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
  247. {"default:steel_ingot", "", "default:steel_ingot"},
  248. }
  249. })
  250. minetest.register_craft({
  251. output = "default:mese",
  252. recipe = {
  253. {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
  254. {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
  255. {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
  256. }
  257. })
  258. minetest.register_craft({
  259. output = "default:meselamp",
  260. recipe = {
  261. {"default:glass"},
  262. {"default:mese_crystal"},
  263. }
  264. })
  265. minetest.register_craft({
  266. output = "default:mese_post_light 3",
  267. recipe = {
  268. {"", "default:glass", ""},
  269. {"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
  270. {"", "group:wood", ""},
  271. }
  272. })
  273. minetest.register_craft({
  274. output = "default:obsidian",
  275. recipe = {
  276. {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
  277. {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
  278. {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
  279. }
  280. })
  281. minetest.register_craft({
  282. output = "default:obsidianbrick 4",
  283. recipe = {
  284. {"default:obsidian", "default:obsidian"},
  285. {"default:obsidian", "default:obsidian"}
  286. }
  287. })
  288. minetest.register_craft({
  289. output = "default:obsidian_block 9",
  290. recipe = {
  291. {"default:obsidian", "default:obsidian", "default:obsidian"},
  292. {"default:obsidian", "default:obsidian", "default:obsidian"},
  293. {"default:obsidian", "default:obsidian", "default:obsidian"},
  294. }
  295. })
  296. minetest.register_craft({
  297. output = "default:stonebrick 4",
  298. recipe = {
  299. {"default:stone", "default:stone"},
  300. {"default:stone", "default:stone"},
  301. }
  302. })
  303. minetest.register_craft({
  304. output = "default:stone_block 9",
  305. recipe = {
  306. {"default:stone", "default:stone", "default:stone"},
  307. {"default:stone", "default:stone", "default:stone"},
  308. {"default:stone", "default:stone", "default:stone"},
  309. }
  310. })
  311. minetest.register_craft({
  312. output = "default:desert_stonebrick 4",
  313. recipe = {
  314. {"default:desert_stone", "default:desert_stone"},
  315. {"default:desert_stone", "default:desert_stone"},
  316. }
  317. })
  318. minetest.register_craft({
  319. output = "default:desert_stone_block 9",
  320. recipe = {
  321. {"default:desert_stone", "default:desert_stone", "default:desert_stone"},
  322. {"default:desert_stone", "default:desert_stone", "default:desert_stone"},
  323. {"default:desert_stone", "default:desert_stone", "default:desert_stone"},
  324. }
  325. })
  326. minetest.register_craft({
  327. output = "default:snowblock",
  328. recipe = {
  329. {"default:snow", "default:snow", "default:snow"},
  330. {"default:snow", "default:snow", "default:snow"},
  331. {"default:snow", "default:snow", "default:snow"},
  332. }
  333. })
  334. minetest.register_craft({
  335. output = "default:snow 9",
  336. recipe = {
  337. {"default:snowblock"},
  338. }
  339. })
  340. minetest.register_craft({
  341. output = "default:emergent_jungle_sapling",
  342. recipe = {
  343. {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
  344. {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
  345. {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
  346. }
  347. })
  348. minetest.register_craft({
  349. output = "default:large_cactus_seedling",
  350. recipe = {
  351. {"", "default:cactus", ""},
  352. {"default:cactus", "default:cactus", "default:cactus"},
  353. {"", "default:cactus", ""},
  354. }
  355. })
  356. --
  357. -- Crafting (tool repair)
  358. --
  359. minetest.register_craft({
  360. type = "toolrepair",
  361. additional_wear = -0.02,
  362. })
  363. --
  364. -- Cooking recipes
  365. --
  366. minetest.register_craft({
  367. type = "cooking",
  368. output = "default:glass",
  369. recipe = "group:sand",
  370. })
  371. minetest.register_craft({
  372. type = "cooking",
  373. output = "default:obsidian_glass",
  374. recipe = "default:obsidian_shard",
  375. })
  376. minetest.register_craft({
  377. type = "cooking",
  378. output = "default:stone",
  379. recipe = "default:cobble",
  380. })
  381. minetest.register_craft({
  382. type = "cooking",
  383. output = "default:stone",
  384. recipe = "default:mossycobble",
  385. })
  386. minetest.register_craft({
  387. type = "cooking",
  388. output = "default:desert_stone",
  389. recipe = "default:desert_cobble",
  390. })
  391. --
  392. -- Fuels
  393. --
  394. -- Support use of group:tree, includes default:tree which has the same burn time
  395. minetest.register_craft({
  396. type = "fuel",
  397. recipe = "group:tree",
  398. burntime = 30,
  399. })
  400. -- Burn time for all woods are in order of wood density,
  401. -- which is also the order of wood colour darkness:
  402. -- aspen, pine, apple, acacia, jungle
  403. minetest.register_craft({
  404. type = "fuel",
  405. recipe = "default:aspen_tree",
  406. burntime = 22,
  407. })
  408. minetest.register_craft({
  409. type = "fuel",
  410. recipe = "default:pine_tree",
  411. burntime = 26,
  412. })
  413. minetest.register_craft({
  414. type = "fuel",
  415. recipe = "default:acacia_tree",
  416. burntime = 34,
  417. })
  418. minetest.register_craft({
  419. type = "fuel",
  420. recipe = "default:jungletree",
  421. burntime = 38,
  422. })
  423. -- Support use of group:wood, includes default:wood which has the same burn time
  424. minetest.register_craft({
  425. type = "fuel",
  426. recipe = "group:wood",
  427. burntime = 7,
  428. })
  429. minetest.register_craft({
  430. type = "fuel",
  431. recipe = "default:aspen_wood",
  432. burntime = 5,
  433. })
  434. minetest.register_craft({
  435. type = "fuel",
  436. recipe = "default:pine_wood",
  437. burntime = 6,
  438. })
  439. minetest.register_craft({
  440. type = "fuel",
  441. recipe = "default:acacia_wood",
  442. burntime = 8,
  443. })
  444. minetest.register_craft({
  445. type = "fuel",
  446. recipe = "default:junglewood",
  447. burntime = 9,
  448. })
  449. -- Support use of group:sapling, includes default:sapling which has the same burn time
  450. minetest.register_craft({
  451. type = "fuel",
  452. recipe = "group:sapling",
  453. burntime = 5,
  454. })
  455. minetest.register_craft({
  456. type = "fuel",
  457. recipe = "default:bush_sapling",
  458. burntime = 3,
  459. })
  460. minetest.register_craft({
  461. type = "fuel",
  462. recipe = "default:acacia_bush_sapling",
  463. burntime = 4,
  464. })
  465. minetest.register_craft({
  466. type = "fuel",
  467. recipe = "default:pine_bush_sapling",
  468. burntime = 2,
  469. })
  470. minetest.register_craft({
  471. type = "fuel",
  472. recipe = "default:aspen_sapling",
  473. burntime = 4,
  474. })
  475. minetest.register_craft({
  476. type = "fuel",
  477. recipe = "default:pine_sapling",
  478. burntime = 5,
  479. })
  480. minetest.register_craft({
  481. type = "fuel",
  482. recipe = "default:acacia_sapling",
  483. burntime = 6,
  484. })
  485. minetest.register_craft({
  486. type = "fuel",
  487. recipe = "default:junglesapling",
  488. burntime = 6,
  489. })
  490. minetest.register_craft({
  491. type = "fuel",
  492. recipe = "default:emergent_jungle_sapling",
  493. burntime = 7,
  494. })
  495. minetest.register_craft({
  496. type = "fuel",
  497. recipe = "default:fence_aspen_wood",
  498. burntime = 5,
  499. })
  500. minetest.register_craft({
  501. type = "fuel",
  502. recipe = "default:fence_pine_wood",
  503. burntime = 6,
  504. })
  505. minetest.register_craft({
  506. type = "fuel",
  507. recipe = "default:fence_wood",
  508. burntime = 7,
  509. })
  510. minetest.register_craft({
  511. type = "fuel",
  512. recipe = "default:fence_acacia_wood",
  513. burntime = 8,
  514. })
  515. minetest.register_craft({
  516. type = "fuel",
  517. recipe = "default:fence_junglewood",
  518. burntime = 9,
  519. })
  520. minetest.register_craft({
  521. type = "fuel",
  522. recipe = "default:fence_rail_aspen_wood",
  523. burntime = 3,
  524. })
  525. minetest.register_craft({
  526. type = "fuel",
  527. recipe = "default:fence_rail_pine_wood",
  528. burntime = 4,
  529. })
  530. minetest.register_craft({
  531. type = "fuel",
  532. recipe = "default:fence_rail_wood",
  533. burntime = 5,
  534. })
  535. minetest.register_craft({
  536. type = "fuel",
  537. recipe = "default:fence_rail_acacia_wood",
  538. burntime = 6,
  539. })
  540. minetest.register_craft({
  541. type = "fuel",
  542. recipe = "default:fence_rail_junglewood",
  543. burntime = 7,
  544. })
  545. minetest.register_craft({
  546. type = "fuel",
  547. recipe = "default:bush_stem",
  548. burntime = 7,
  549. })
  550. minetest.register_craft({
  551. type = "fuel",
  552. recipe = "default:acacia_bush_stem",
  553. burntime = 8,
  554. })
  555. minetest.register_craft({
  556. type = "fuel",
  557. recipe = "default:pine_bush_stem",
  558. burntime = 6,
  559. })
  560. minetest.register_craft({
  561. type = "fuel",
  562. recipe = "default:junglegrass",
  563. burntime = 3,
  564. })
  565. minetest.register_craft({
  566. type = "fuel",
  567. recipe = "group:leaves",
  568. burntime = 4,
  569. })
  570. minetest.register_craft({
  571. type = "fuel",
  572. recipe = "default:cactus",
  573. burntime = 15,
  574. })
  575. minetest.register_craft({
  576. type = "fuel",
  577. recipe = "default:large_cactus_seedling",
  578. burntime = 5,
  579. })
  580. minetest.register_craft({
  581. type = "fuel",
  582. recipe = "default:papyrus",
  583. burntime = 3,
  584. })
  585. minetest.register_craft({
  586. type = "fuel",
  587. recipe = "default:bookshelf",
  588. burntime = 30,
  589. })
  590. minetest.register_craft({
  591. type = "fuel",
  592. recipe = "default:ladder_wood",
  593. burntime = 7,
  594. })
  595. minetest.register_craft({
  596. type = "fuel",
  597. recipe = "default:lava_source",
  598. burntime = 60,
  599. })
  600. minetest.register_craft({
  601. type = "fuel",
  602. recipe = "default:sign_wall_wood",
  603. burntime = 10,
  604. })
  605. minetest.register_craft({
  606. type = "fuel",
  607. recipe = "default:coalblock",
  608. burntime = 370,
  609. })
  610. minetest.register_craft({
  611. type = "fuel",
  612. recipe = "default:grass_1",
  613. burntime = 2,
  614. })
  615. minetest.register_craft({
  616. type = "fuel",
  617. recipe = "default:dry_grass_1",
  618. burntime = 2,
  619. })
  620. minetest.register_craft({
  621. type = "fuel",
  622. recipe = "default:fern_1",
  623. burntime = 2,
  624. })
  625. minetest.register_craft({
  626. type = "fuel",
  627. recipe = "default:marram_grass_1",
  628. burntime = 2,
  629. })
  630. minetest.register_craft({
  631. type = "fuel",
  632. recipe = "default:dry_shrub",
  633. burntime = 2,
  634. })