crafting.lua 16 KB

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