crafting.lua 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763
  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. type = "anvil",
  209. output = 'default:paper',
  210. recipe = 'default:papyrus 2',
  211. })
  212. minetest.register_craft({
  213. type = "compressing",
  214. output = 'default:paper',
  215. recipe = 'default:papyrus 2',
  216. time = 5,
  217. })
  218. minetest.register_craft({
  219. output = 'default:ladder_wood 3',
  220. recipe = {
  221. {'group:stick', '', 'group:stick'},
  222. {'group:stick', 'group:stick', 'group:stick'},
  223. {'group:stick', '', 'group:stick'},
  224. }
  225. })
  226. -- trap ladder
  227. minetest.register_craft({
  228. output = 'defauIt:ladder_wood 3',
  229. recipe = {
  230. {'group:stick', '', 'group:stick'},
  231. {'default:dry_shrub', 'group:stick', 'default:dry_shrub'},
  232. {'group:stick', '', 'group:stick'},
  233. }
  234. })
  235. minetest.register_craft({
  236. output = 'default:padlock',
  237. recipe = {
  238. {"moreores:tin_ingot"},
  239. {"cast_iron:ingot"},
  240. },
  241. })
  242. minetest.register_craft({
  243. output = 'default:ladder_steel 5',
  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. -- trap ladder
  251. minetest.register_craft({
  252. output = 'defauIt:ladder_steel 5',
  253. recipe = {
  254. {'default:steel_ingot', '', 'default:steel_ingot'},
  255. {'xdecor:lever_off', 'default:steel_ingot', 'xdecor:lever_off'},
  256. {'default:steel_ingot', '', 'default:steel_ingot'},
  257. }
  258. })
  259. -- Needed so players can craft protections from mined crystals.
  260. minetest.register_craft({
  261. output = 'default:mese',
  262. recipe = {
  263. {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
  264. {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
  265. {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
  266. }
  267. })
  268. ---[[
  269. minetest.register_craft({
  270. output = 'default:mese_crystal 9',
  271. recipe = {{'default:mese'}}
  272. })
  273. --]]
  274. --[[
  275. minetest.register_craft({
  276. type = "grinding",
  277. output = "default:mese_crystal 9",
  278. recipe = "default:mese",
  279. time = 10,
  280. })
  281. --]]
  282. minetest.register_craft({
  283. type = "anvil",
  284. output = 'default:mese_crystal_fragment 9',
  285. recipe = 'default:mese_crystal',
  286. })
  287. minetest.register_craft({
  288. type = "grinding",
  289. output = "default:mese_crystal_fragment 9",
  290. recipe = "default:mese_crystal",
  291. time = 10,
  292. })
  293. minetest.register_craft({
  294. output = "default:mese_crystal",
  295. recipe = {
  296. {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
  297. {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
  298. {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
  299. }
  300. })
  301. minetest.register_craft({
  302. output = 'default:meselamp',
  303. recipe = {
  304. {'', 'default:mese_crystal', ''},
  305. {'default:mese_crystal', 'default:glass', 'default:mese_crystal'},
  306. },
  307. })
  308. minetest.register_craft({
  309. output = 'default:lightbox',
  310. recipe = {
  311. {'group:stick', 'group:stick', 'group:stick'},
  312. {'default:glass', 'xdecor:lantern', 'default:glass'},
  313. {'group:stick', 'group:stick', 'group:stick'},
  314. }
  315. })
  316. minetest.register_craft({
  317. type = "grinding",
  318. output = 'default:obsidian_shard 9',
  319. recipe = 'default:obsidian',
  320. })
  321. minetest.register_craft({
  322. type = "anvil",
  323. output = 'default:obsidian_shard 9',
  324. recipe = 'default:obsidian',
  325. })
  326. minetest.register_craft({
  327. output = 'default:obsidian',
  328. recipe = {
  329. {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
  330. {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
  331. {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
  332. }
  333. })
  334. minetest.register_craft({
  335. output = 'default:obsidianbrick 4',
  336. recipe = {
  337. {'default:obsidian', 'default:obsidian'},
  338. {'default:obsidian', 'default:obsidian'}
  339. }
  340. })
  341. minetest.register_craft({
  342. output = 'default:obsidian_block 9',
  343. recipe = {
  344. {'default:obsidian', 'default:obsidian', 'default:obsidian'},
  345. {'default:obsidian', 'default:obsidian', 'default:obsidian'},
  346. {'default:obsidian', 'default:obsidian', 'default:obsidian'},
  347. }
  348. })
  349. minetest.register_craft({
  350. output = 'default:stonebrick 4',
  351. recipe = {
  352. {'default:stone', 'default:stone'},
  353. {'default:stone', 'default:stone'},
  354. }
  355. })
  356. minetest.register_craft({
  357. output = 'default:stone_block 9',
  358. recipe = {
  359. {'default:stone', 'default:stone', 'default:stone'},
  360. {'default:stone', 'default:stone', 'default:stone'},
  361. {'default:stone', 'default:stone', 'default:stone'},
  362. }
  363. })
  364. minetest.register_craft({
  365. output = 'default:desert_stonebrick 4',
  366. recipe = {
  367. {'default:desert_stone', 'default:desert_stone'},
  368. {'default:desert_stone', 'default:desert_stone'},
  369. }
  370. })
  371. minetest.register_craft({
  372. output = 'default:desert_stone_block 9',
  373. recipe = {
  374. {'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
  375. {'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
  376. {'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
  377. }
  378. })
  379. minetest.register_craft({
  380. output = 'default:snowblock',
  381. recipe = {
  382. {'default:snow', 'default:snow', 'default:snow'},
  383. {'default:snow', 'default:snow', 'default:snow'},
  384. {'default:snow', 'default:snow', 'default:snow'},
  385. }
  386. })
  387. minetest.register_craft({
  388. output = 'default:snow 9',
  389. recipe = {
  390. {'default:snowblock'},
  391. }
  392. })
  393. --
  394. -- Crafting (tool repair)
  395. --
  396. minetest.register_craft({
  397. type = "toolrepair",
  398. -- Buff increased from 0.02 to 0.15 percent, by MustTest.
  399. additional_wear = -0.15,
  400. })
  401. --
  402. -- Cooking recipes
  403. --
  404. minetest.register_craft({
  405. type = "cooking",
  406. output = "default:glass",
  407. recipe = "group:sand",
  408. })
  409. minetest.register_craft({
  410. type = "cooking",
  411. output = "default:obsidian_glass",
  412. recipe = "default:obsidian_shard",
  413. })
  414. minetest.register_craft({
  415. type = "cooking",
  416. output = "default:stone",
  417. recipe = "default:cobble",
  418. })
  419. minetest.register_craft({
  420. type = "cooking",
  421. output = "default:stone",
  422. recipe = "default:mossycobble",
  423. })
  424. minetest.register_craft({
  425. type = "cooking",
  426. output = "default:desert_stone",
  427. recipe = "default:desert_cobble2",
  428. })
  429. minetest.register_craft({
  430. type = "shapeless",
  431. output = "default:desert_cobble",
  432. recipe = {"default:desert_cobble2", "darkage:chalk_powder"}
  433. })
  434. minetest.register_craft({
  435. type = "cooking",
  436. output = "default:steel_ingot",
  437. recipe = "default:iron_lump",
  438. })
  439. minetest.register_craft({
  440. type = "cooking",
  441. output = "default:copper_ingot",
  442. recipe = "default:copper_lump",
  443. })
  444. minetest.register_craft({
  445. type = "cooking",
  446. output = "default:gold_ingot",
  447. recipe = "default:gold_lump",
  448. })
  449. minetest.register_craft({
  450. type = "cooking",
  451. output = "default:clay_brick",
  452. recipe = "default:clay_lump",
  453. })
  454. --
  455. -- Fuels
  456. --
  457. -- Support use of group:tree
  458. minetest.register_craft({
  459. type = "fuel",
  460. recipe = "group:tree",
  461. burntime = 30,
  462. })
  463. -- Burn time for all woods are in order of wood density,
  464. -- which is also the order of wood colour darkness:
  465. -- aspen, pine, apple, acacia, jungle
  466. minetest.register_craft({
  467. type = "fuel",
  468. recipe = "default:aspen_tree",
  469. burntime = 22,
  470. })
  471. minetest.register_craft({
  472. type = "fuel",
  473. recipe = "default:pine_tree",
  474. burntime = 26,
  475. })
  476. minetest.register_craft({
  477. type = "fuel",
  478. recipe = "default:tree",
  479. burntime = 30,
  480. })
  481. minetest.register_craft({
  482. type = "fuel",
  483. recipe = "default:acacia_tree",
  484. burntime = 34,
  485. })
  486. minetest.register_craft({
  487. type = "fuel",
  488. recipe = "default:jungletree",
  489. burntime = 38,
  490. })
  491. -- Support use of group:wood
  492. minetest.register_craft({
  493. type = "fuel",
  494. recipe = "group:wood",
  495. burntime = 7,
  496. })
  497. minetest.register_craft({
  498. type = "fuel",
  499. recipe = "default:aspen_wood",
  500. burntime = 5,
  501. })
  502. minetest.register_craft({
  503. type = "fuel",
  504. recipe = "default:pine_wood",
  505. burntime = 6,
  506. })
  507. minetest.register_craft({
  508. type = "fuel",
  509. recipe = "default:wood",
  510. burntime = 7,
  511. })
  512. minetest.register_craft({
  513. type = "fuel",
  514. recipe = "default:acacia_wood",
  515. burntime = 8,
  516. })
  517. minetest.register_craft({
  518. type = "fuel",
  519. recipe = "default:junglewood",
  520. burntime = 9,
  521. })
  522. -- Support use of group:sapling
  523. minetest.register_craft({
  524. type = "fuel",
  525. recipe = "group:sapling",
  526. burntime = 10,
  527. })
  528. minetest.register_craft({
  529. type = "fuel",
  530. recipe = "default:aspen_sapling",
  531. burntime = 8,
  532. })
  533. minetest.register_craft({
  534. type = "fuel",
  535. recipe = "basictrees:pine_sapling",
  536. burntime = 9,
  537. })
  538. minetest.register_craft({
  539. type = "fuel",
  540. recipe = "basictrees:tree_sapling",
  541. burntime = 10,
  542. })
  543. minetest.register_craft({
  544. type = "fuel",
  545. recipe = "basictrees:acacia_sapling",
  546. burntime = 11,
  547. })
  548. minetest.register_craft({
  549. type = "fuel",
  550. recipe = "basictrees:jungletree_sapling",
  551. burntime = 12,
  552. })
  553. minetest.register_craft({
  554. type = "fuel",
  555. recipe = "default:fence_aspen_wood",
  556. burntime = 11,
  557. })
  558. minetest.register_craft({
  559. type = "fuel",
  560. recipe = "default:fence_pine_wood",
  561. burntime = 13,
  562. })
  563. minetest.register_craft({
  564. type = "fuel",
  565. recipe = "default:fence_wood",
  566. burntime = 15,
  567. })
  568. minetest.register_craft({
  569. type = "fuel",
  570. recipe = "default:fence_acacia_wood",
  571. burntime = 17,
  572. })
  573. minetest.register_craft({
  574. type = "fuel",
  575. recipe = "default:fence_junglewood",
  576. burntime = 19,
  577. })
  578. minetest.register_craft({
  579. type = "fuel",
  580. recipe = "default:junglegrass",
  581. burntime = 2,
  582. })
  583. minetest.register_craft({
  584. type = "fuel",
  585. recipe = "group:leaves",
  586. burntime = 1,
  587. })
  588. minetest.register_craft({
  589. type = "fuel",
  590. recipe = "default:cactus",
  591. burntime = 15,
  592. })
  593. minetest.register_craft({
  594. type = "fuel",
  595. recipe = "default:papyrus",
  596. burntime = 1,
  597. })
  598. minetest.register_craft({
  599. type = "fuel",
  600. recipe = "default:ladder_wood",
  601. burntime = 5,
  602. })
  603. minetest.register_craft({
  604. type = "fuel",
  605. recipe = "default:lava_source",
  606. burntime = 60,
  607. })
  608. minetest.register_craft({
  609. type = "fuel",
  610. recipe = "default:sign_wall_wood",
  611. burntime = 10,
  612. })
  613. minetest.register_craft({
  614. type = "fuel",
  615. recipe = "basictrees:tree_apple",
  616. burntime = 3,
  617. })
  618. minetest.register_craft({
  619. type = "fuel",
  620. recipe = "default:coal_lump",
  621. burntime = 40,
  622. })
  623. minetest.register_craft({
  624. type = "coalfuel",
  625. recipe = "default:coal_lump",
  626. burntime = 40,
  627. })
  628. minetest.register_craft({
  629. type = "fuel",
  630. recipe = "default:coalblock",
  631. -- Burntime increased to 450 from 370, by MustTest.
  632. -- This makes it worth it to burn coal blocks instead of coal lumps.
  633. burntime = 450,
  634. })
  635. minetest.register_craft({
  636. type = "coalfuel",
  637. recipe = "default:coalblock",
  638. -- Burntime increased to 450 from 370, by MustTest.
  639. -- This makes it worth it to burn coal blocks instead of coal lumps.
  640. burntime = 450,
  641. })
  642. minetest.register_craft({
  643. type = "fuel",
  644. recipe = "default:grass_dummy",
  645. burntime = 2,
  646. })
  647. minetest.register_craft({
  648. type = "fuel",
  649. recipe = "default:dry_grass_dummy",
  650. burntime = 2,
  651. })