crafting.lua 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  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. -- Recipe deleted after this date.
  299. if os.time() < os.time({month=1,day=1,year=2024}) then
  300. minetest.register_craft({
  301. output = "default:mese_crystal",
  302. recipe = {
  303. {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
  304. {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
  305. {"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
  306. }
  307. })
  308. end
  309. minetest.register_craft({
  310. output = 'default:meselamp',
  311. recipe = {
  312. {'', 'default:mese_crystal', ''},
  313. {'default:mese_crystal', 'default:glass', 'default:mese_crystal'},
  314. },
  315. })
  316. minetest.register_craft({
  317. output = 'default:lightbox',
  318. recipe = {
  319. {'group:stick', 'group:stick', 'group:stick'},
  320. {'default:glass', 'xdecor:lantern', 'default:glass'},
  321. {'group:stick', 'group:stick', 'group:stick'},
  322. }
  323. })
  324. minetest.register_craft({
  325. type = "grinding",
  326. output = 'default:obsidian_shard 9',
  327. recipe = 'default:obsidian',
  328. })
  329. minetest.register_craft({
  330. type = "anvil",
  331. output = 'default:obsidian_shard 4',
  332. recipe = 'default:obsidian',
  333. })
  334. minetest.register_craft({
  335. output = 'default:obsidian',
  336. recipe = {
  337. {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
  338. {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
  339. {'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
  340. }
  341. })
  342. minetest.register_craft({
  343. output = 'default:obsidianbrick 4',
  344. recipe = {
  345. {'default:obsidian', 'default:obsidian'},
  346. {'default:obsidian', 'default:obsidian'}
  347. }
  348. })
  349. minetest.register_craft({
  350. output = 'default:obsidian_block 9',
  351. recipe = {
  352. {'default:obsidian', 'default:obsidian', 'default:obsidian'},
  353. {'default:obsidian', 'default:obsidian', 'default:obsidian'},
  354. {'default:obsidian', 'default:obsidian', 'default:obsidian'},
  355. }
  356. })
  357. minetest.register_craft({
  358. output = 'default:stonebrick 4',
  359. recipe = {
  360. {'default:stone', 'default:stone'},
  361. {'default:stone', 'default:stone'},
  362. }
  363. })
  364. minetest.register_craft({
  365. output = 'default:stone_block 9',
  366. recipe = {
  367. {'default:stone', 'default:stone', 'default:stone'},
  368. {'default:stone', 'default:stone', 'default:stone'},
  369. {'default:stone', 'default:stone', 'default:stone'},
  370. }
  371. })
  372. minetest.register_craft({
  373. output = 'default:desert_stonebrick 4',
  374. recipe = {
  375. {'default:desert_stone', 'default:desert_stone'},
  376. {'default:desert_stone', 'default:desert_stone'},
  377. }
  378. })
  379. minetest.register_craft({
  380. output = 'default:desert_stone_block 9',
  381. recipe = {
  382. {'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
  383. {'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
  384. {'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
  385. }
  386. })
  387. minetest.register_craft({
  388. output = 'default:snowblock',
  389. recipe = {
  390. {'default:snow', 'default:snow', 'default:snow'},
  391. {'default:snow', 'default:snow', 'default:snow'},
  392. {'default:snow', 'default:snow', 'default:snow'},
  393. }
  394. })
  395. minetest.register_craft({
  396. output = 'default:snow 9',
  397. recipe = {
  398. {'default:snowblock'},
  399. }
  400. })
  401. --
  402. -- Crafting (tool repair)
  403. --
  404. minetest.register_craft({
  405. type = "toolrepair",
  406. -- Buff increased from 0.02 to 0.15 percent, by MustTest.
  407. additional_wear = -0.15,
  408. })
  409. --
  410. -- Cooking recipes
  411. --
  412. minetest.register_craft({
  413. type = "cooking",
  414. output = "default:glass",
  415. recipe = "group:sand",
  416. })
  417. minetest.register_craft({
  418. type = "cooking",
  419. output = "default:obsidian_glass",
  420. recipe = "default:obsidian_shard",
  421. })
  422. minetest.register_craft({
  423. type = "cooking",
  424. output = "default:stone",
  425. recipe = "default:cobble",
  426. })
  427. minetest.register_craft({
  428. type = "cooking",
  429. output = "default:stone",
  430. recipe = "default:mossycobble",
  431. })
  432. minetest.register_craft({
  433. type = "cooking",
  434. output = "default:desert_stone",
  435. recipe = "default:desert_cobble2",
  436. })
  437. minetest.register_craft({
  438. type = "shapeless",
  439. output = "default:desert_cobble",
  440. recipe = {"default:desert_cobble2", "darkage:chalk_powder"}
  441. })
  442. minetest.register_craft({
  443. type = "cooking",
  444. output = "default:steel_ingot",
  445. recipe = "default:iron_lump",
  446. })
  447. minetest.register_craft({
  448. type = "cooking",
  449. output = "default:copper_ingot",
  450. recipe = "default:copper_lump",
  451. })
  452. minetest.register_craft({
  453. type = "cooking",
  454. output = "default:gold_ingot",
  455. recipe = "default:gold_lump",
  456. })
  457. minetest.register_craft({
  458. type = "cooking",
  459. output = "default:clay_brick",
  460. recipe = "default:clay_lump",
  461. })
  462. minetest.register_craft({
  463. type = "cooking",
  464. output = "default:adamant",
  465. recipe = "default:adamant_brittle",
  466. cooktime = 60,
  467. })
  468. --
  469. -- Fuels
  470. --
  471. -- Support use of group:tree
  472. minetest.register_craft({
  473. type = "fuel",
  474. recipe = "group:tree",
  475. burntime = 30,
  476. })
  477. -- Burn time for all woods are in order of wood density,
  478. -- which is also the order of wood colour darkness:
  479. -- aspen, pine, apple, acacia, jungle
  480. minetest.register_craft({
  481. type = "fuel",
  482. recipe = "default:aspen_tree",
  483. burntime = 22,
  484. })
  485. minetest.register_craft({
  486. type = "fuel",
  487. recipe = "default:pine_tree",
  488. burntime = 26,
  489. })
  490. minetest.register_craft({
  491. type = "fuel",
  492. recipe = "default:tree",
  493. burntime = 30,
  494. })
  495. minetest.register_craft({
  496. type = "fuel",
  497. recipe = "default:acacia_tree",
  498. burntime = 34,
  499. })
  500. minetest.register_craft({
  501. type = "fuel",
  502. recipe = "default:jungletree",
  503. burntime = 38,
  504. })
  505. -- Support use of group:wood
  506. minetest.register_craft({
  507. type = "fuel",
  508. recipe = "group:wood",
  509. burntime = 7,
  510. })
  511. minetest.register_craft({
  512. type = "fuel",
  513. recipe = "default:aspen_wood",
  514. burntime = 5,
  515. })
  516. minetest.register_craft({
  517. type = "fuel",
  518. recipe = "default:pine_wood",
  519. burntime = 6,
  520. })
  521. minetest.register_craft({
  522. type = "fuel",
  523. recipe = "default:wood",
  524. burntime = 7,
  525. })
  526. minetest.register_craft({
  527. type = "fuel",
  528. recipe = "default:acacia_wood",
  529. burntime = 8,
  530. })
  531. minetest.register_craft({
  532. type = "fuel",
  533. recipe = "default:junglewood",
  534. burntime = 9,
  535. })
  536. -- Support use of group:sapling
  537. minetest.register_craft({
  538. type = "fuel",
  539. recipe = "group:sapling",
  540. burntime = 10,
  541. })
  542. minetest.register_craft({
  543. type = "fuel",
  544. recipe = "default:aspen_sapling",
  545. burntime = 8,
  546. })
  547. minetest.register_craft({
  548. type = "fuel",
  549. recipe = "basictrees:pine_sapling",
  550. burntime = 9,
  551. })
  552. minetest.register_craft({
  553. type = "fuel",
  554. recipe = "basictrees:tree_sapling",
  555. burntime = 10,
  556. })
  557. minetest.register_craft({
  558. type = "fuel",
  559. recipe = "basictrees:acacia_sapling",
  560. burntime = 11,
  561. })
  562. minetest.register_craft({
  563. type = "fuel",
  564. recipe = "basictrees:jungletree_sapling",
  565. burntime = 12,
  566. })
  567. minetest.register_craft({
  568. type = "fuel",
  569. recipe = "default:fence_aspen_wood",
  570. burntime = 11,
  571. })
  572. minetest.register_craft({
  573. type = "fuel",
  574. recipe = "default:fence_pine_wood",
  575. burntime = 13,
  576. })
  577. minetest.register_craft({
  578. type = "fuel",
  579. recipe = "default:fence_wood",
  580. burntime = 15,
  581. })
  582. minetest.register_craft({
  583. type = "fuel",
  584. recipe = "default:fence_acacia_wood",
  585. burntime = 17,
  586. })
  587. minetest.register_craft({
  588. type = "fuel",
  589. recipe = "default:fence_junglewood",
  590. burntime = 19,
  591. })
  592. minetest.register_craft({
  593. type = "fuel",
  594. recipe = "default:junglegrass",
  595. burntime = 2,
  596. })
  597. minetest.register_craft({
  598. type = "fuel",
  599. recipe = "group:leaves",
  600. burntime = 1,
  601. })
  602. minetest.register_craft({
  603. type = "fuel",
  604. recipe = "default:cactus",
  605. burntime = 15,
  606. })
  607. minetest.register_craft({
  608. type = "fuel",
  609. recipe = "default:papyrus",
  610. burntime = 1,
  611. })
  612. minetest.register_craft({
  613. type = "fuel",
  614. recipe = "default:ladder_wood",
  615. burntime = 5,
  616. })
  617. minetest.register_craft({
  618. type = "fuel",
  619. recipe = "default:lava_source",
  620. burntime = 60,
  621. })
  622. minetest.register_craft({
  623. type = "fuel",
  624. recipe = "default:sign_wall_wood",
  625. burntime = 10,
  626. })
  627. minetest.register_craft({
  628. type = "fuel",
  629. recipe = "basictrees:tree_apple",
  630. burntime = 3,
  631. })
  632. minetest.register_craft({
  633. type = "fuel",
  634. recipe = "default:coal_lump",
  635. burntime = 40,
  636. })
  637. minetest.register_craft({
  638. type = "coalfuel",
  639. recipe = "default:coal_lump",
  640. burntime = 40,
  641. })
  642. minetest.register_craft({
  643. type = "fuel",
  644. recipe = "default:coalblock",
  645. -- Burntime increased to 450 from 370, by MustTest.
  646. -- This makes it worth it to burn coal blocks instead of coal lumps.
  647. burntime = 450,
  648. })
  649. minetest.register_craft({
  650. type = "coalfuel",
  651. recipe = "default:coalblock",
  652. -- Burntime increased to 450 from 370, by MustTest.
  653. -- This makes it worth it to burn coal blocks instead of coal lumps.
  654. burntime = 450,
  655. })
  656. minetest.register_craft({
  657. type = "fuel",
  658. recipe = "default:grass_dummy",
  659. burntime = 2,
  660. })
  661. minetest.register_craft({
  662. type = "fuel",
  663. recipe = "default:dry_grass_dummy",
  664. burntime = 2,
  665. })