crafting.lua 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  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:obsidian",
  267. recipe = {
  268. {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
  269. {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
  270. {"default:obsidian_shard", "default:obsidian_shard", "default:obsidian_shard"},
  271. }
  272. })
  273. minetest.register_craft({
  274. output = "default:obsidianbrick 4",
  275. recipe = {
  276. {"default:obsidian", "default:obsidian"},
  277. {"default:obsidian", "default:obsidian"}
  278. }
  279. })
  280. minetest.register_craft({
  281. output = "default:obsidian_block 9",
  282. recipe = {
  283. {"default:obsidian", "default:obsidian", "default:obsidian"},
  284. {"default:obsidian", "default:obsidian", "default:obsidian"},
  285. {"default:obsidian", "default:obsidian", "default:obsidian"},
  286. }
  287. })
  288. minetest.register_craft({
  289. output = "default:stonebrick 4",
  290. recipe = {
  291. {"default:stone", "default:stone"},
  292. {"default:stone", "default:stone"},
  293. }
  294. })
  295. minetest.register_craft({
  296. output = "default:stone_block 9",
  297. recipe = {
  298. {"default:stone", "default:stone", "default:stone"},
  299. {"default:stone", "default:stone", "default:stone"},
  300. {"default:stone", "default:stone", "default:stone"},
  301. }
  302. })
  303. minetest.register_craft({
  304. output = "default:desert_stonebrick 4",
  305. recipe = {
  306. {"default:desert_stone", "default:desert_stone"},
  307. {"default:desert_stone", "default:desert_stone"},
  308. }
  309. })
  310. minetest.register_craft({
  311. output = "default:desert_stone_block 9",
  312. recipe = {
  313. {"default:desert_stone", "default:desert_stone", "default:desert_stone"},
  314. {"default:desert_stone", "default:desert_stone", "default:desert_stone"},
  315. {"default:desert_stone", "default:desert_stone", "default:desert_stone"},
  316. }
  317. })
  318. minetest.register_craft({
  319. output = "default:snowblock",
  320. recipe = {
  321. {"default:snow", "default:snow", "default:snow"},
  322. {"default:snow", "default:snow", "default:snow"},
  323. {"default:snow", "default:snow", "default:snow"},
  324. }
  325. })
  326. minetest.register_craft({
  327. output = "default:snow 9",
  328. recipe = {
  329. {"default:snowblock"},
  330. }
  331. })
  332. minetest.register_craft({
  333. output = "default:emergent_jungle_sapling",
  334. recipe = {
  335. {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
  336. {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
  337. {"default:junglesapling", "default:junglesapling", "default:junglesapling"},
  338. }
  339. })
  340. minetest.register_craft({
  341. output = "default:large_cactus_seedling",
  342. recipe = {
  343. {"", "default:cactus", ""},
  344. {"default:cactus", "default:cactus", "default:cactus"},
  345. {"", "default:cactus", ""},
  346. }
  347. })
  348. --
  349. -- Crafting (tool repair)
  350. --
  351. minetest.register_craft({
  352. type = "toolrepair",
  353. additional_wear = -0.02,
  354. })
  355. --
  356. -- Cooking recipes
  357. --
  358. minetest.register_craft({
  359. type = "cooking",
  360. output = "default:glass",
  361. recipe = "group:sand",
  362. })
  363. minetest.register_craft({
  364. type = "cooking",
  365. output = "default:obsidian_glass",
  366. recipe = "default:obsidian_shard",
  367. })
  368. minetest.register_craft({
  369. type = "cooking",
  370. output = "default:stone",
  371. recipe = "default:cobble",
  372. })
  373. minetest.register_craft({
  374. type = "cooking",
  375. output = "default:stone",
  376. recipe = "default:mossycobble",
  377. })
  378. minetest.register_craft({
  379. type = "cooking",
  380. output = "default:desert_stone",
  381. recipe = "default:desert_cobble",
  382. })
  383. --
  384. -- Fuels
  385. --
  386. -- Support use of group:tree, includes default:tree which has the same burn time
  387. minetest.register_craft({
  388. type = "fuel",
  389. recipe = "group:tree",
  390. burntime = 30,
  391. })
  392. -- Burn time for all woods are in order of wood density,
  393. -- which is also the order of wood colour darkness:
  394. -- aspen, pine, apple, acacia, jungle
  395. minetest.register_craft({
  396. type = "fuel",
  397. recipe = "default:aspen_tree",
  398. burntime = 22,
  399. })
  400. minetest.register_craft({
  401. type = "fuel",
  402. recipe = "default:pine_tree",
  403. burntime = 26,
  404. })
  405. minetest.register_craft({
  406. type = "fuel",
  407. recipe = "default:acacia_tree",
  408. burntime = 34,
  409. })
  410. minetest.register_craft({
  411. type = "fuel",
  412. recipe = "default:jungletree",
  413. burntime = 38,
  414. })
  415. -- Support use of group:wood, includes default:wood which has the same burn time
  416. minetest.register_craft({
  417. type = "fuel",
  418. recipe = "group:wood",
  419. burntime = 7,
  420. })
  421. minetest.register_craft({
  422. type = "fuel",
  423. recipe = "default:aspen_wood",
  424. burntime = 5,
  425. })
  426. minetest.register_craft({
  427. type = "fuel",
  428. recipe = "default:pine_wood",
  429. burntime = 6,
  430. })
  431. minetest.register_craft({
  432. type = "fuel",
  433. recipe = "default:acacia_wood",
  434. burntime = 8,
  435. })
  436. minetest.register_craft({
  437. type = "fuel",
  438. recipe = "default:junglewood",
  439. burntime = 9,
  440. })
  441. -- Support use of group:sapling, includes default:sapling which has the same burn time
  442. minetest.register_craft({
  443. type = "fuel",
  444. recipe = "group:sapling",
  445. burntime = 5,
  446. })
  447. minetest.register_craft({
  448. type = "fuel",
  449. recipe = "default:bush_sapling",
  450. burntime = 3,
  451. })
  452. minetest.register_craft({
  453. type = "fuel",
  454. recipe = "default:acacia_bush_sapling",
  455. burntime = 4,
  456. })
  457. minetest.register_craft({
  458. type = "fuel",
  459. recipe = "default:pine_bush_sapling",
  460. burntime = 2,
  461. })
  462. minetest.register_craft({
  463. type = "fuel",
  464. recipe = "default:aspen_sapling",
  465. burntime = 4,
  466. })
  467. minetest.register_craft({
  468. type = "fuel",
  469. recipe = "default:pine_sapling",
  470. burntime = 5,
  471. })
  472. minetest.register_craft({
  473. type = "fuel",
  474. recipe = "default:acacia_sapling",
  475. burntime = 6,
  476. })
  477. minetest.register_craft({
  478. type = "fuel",
  479. recipe = "default:junglesapling",
  480. burntime = 6,
  481. })
  482. minetest.register_craft({
  483. type = "fuel",
  484. recipe = "default:emergent_jungle_sapling",
  485. burntime = 7,
  486. })
  487. minetest.register_craft({
  488. type = "fuel",
  489. recipe = "default:fence_aspen_wood",
  490. burntime = 5,
  491. })
  492. minetest.register_craft({
  493. type = "fuel",
  494. recipe = "default:fence_pine_wood",
  495. burntime = 6,
  496. })
  497. minetest.register_craft({
  498. type = "fuel",
  499. recipe = "default:fence_wood",
  500. burntime = 7,
  501. })
  502. minetest.register_craft({
  503. type = "fuel",
  504. recipe = "default:fence_acacia_wood",
  505. burntime = 8,
  506. })
  507. minetest.register_craft({
  508. type = "fuel",
  509. recipe = "default:fence_junglewood",
  510. burntime = 9,
  511. })
  512. minetest.register_craft({
  513. type = "fuel",
  514. recipe = "default:fence_rail_aspen_wood",
  515. burntime = 3,
  516. })
  517. minetest.register_craft({
  518. type = "fuel",
  519. recipe = "default:fence_rail_pine_wood",
  520. burntime = 4,
  521. })
  522. minetest.register_craft({
  523. type = "fuel",
  524. recipe = "default:fence_rail_wood",
  525. burntime = 5,
  526. })
  527. minetest.register_craft({
  528. type = "fuel",
  529. recipe = "default:fence_rail_acacia_wood",
  530. burntime = 6,
  531. })
  532. minetest.register_craft({
  533. type = "fuel",
  534. recipe = "default:fence_rail_junglewood",
  535. burntime = 7,
  536. })
  537. minetest.register_craft({
  538. type = "fuel",
  539. recipe = "default:bush_stem",
  540. burntime = 7,
  541. })
  542. minetest.register_craft({
  543. type = "fuel",
  544. recipe = "default:acacia_bush_stem",
  545. burntime = 8,
  546. })
  547. minetest.register_craft({
  548. type = "fuel",
  549. recipe = "default:pine_bush_stem",
  550. burntime = 6,
  551. })
  552. minetest.register_craft({
  553. type = "fuel",
  554. recipe = "default:junglegrass",
  555. burntime = 3,
  556. })
  557. minetest.register_craft({
  558. type = "fuel",
  559. recipe = "group:leaves",
  560. burntime = 4,
  561. })
  562. minetest.register_craft({
  563. type = "fuel",
  564. recipe = "default:cactus",
  565. burntime = 15,
  566. })
  567. minetest.register_craft({
  568. type = "fuel",
  569. recipe = "default:large_cactus_seedling",
  570. burntime = 5,
  571. })
  572. minetest.register_craft({
  573. type = "fuel",
  574. recipe = "default:papyrus",
  575. burntime = 3,
  576. })
  577. minetest.register_craft({
  578. type = "fuel",
  579. recipe = "default:bookshelf",
  580. burntime = 30,
  581. })
  582. minetest.register_craft({
  583. type = "fuel",
  584. recipe = "default:ladder_wood",
  585. burntime = 7,
  586. })
  587. minetest.register_craft({
  588. type = "fuel",
  589. recipe = "default:lava_source",
  590. burntime = 60,
  591. })
  592. minetest.register_craft({
  593. type = "fuel",
  594. recipe = "default:sign_wall_wood",
  595. burntime = 10,
  596. })
  597. minetest.register_craft({
  598. type = "fuel",
  599. recipe = "default:coalblock",
  600. burntime = 370,
  601. })
  602. minetest.register_craft({
  603. type = "fuel",
  604. recipe = "default:grass_1",
  605. burntime = 2,
  606. })
  607. minetest.register_craft({
  608. type = "fuel",
  609. recipe = "default:dry_grass_1",
  610. burntime = 2,
  611. })
  612. minetest.register_craft({
  613. type = "fuel",
  614. recipe = "default:fern_1",
  615. burntime = 2,
  616. })
  617. minetest.register_craft({
  618. type = "fuel",
  619. recipe = "default:marram_grass_1",
  620. burntime = 2,
  621. })
  622. minetest.register_craft({
  623. type = "fuel",
  624. recipe = "default:dry_shrub",
  625. burntime = 2,
  626. })