crafting.lua 16 KB

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