crafting.lua 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790
  1. -- mods/default/crafting.lua
  2. --
  3. -- Crafting definition
  4. --
  5. minetest.register_craft({
  6. output = 'default:wood 2',
  7. recipe = {
  8. {'group:tree'},
  9. }
  10. })
  11. minetest.register_craft({
  12. output = 'default:stick 6',
  13. recipe = {
  14. {'group:leaves'},
  15. {'group:leaves'},
  16. {'group:leaves'},
  17. }
  18. })
  19. minetest.register_craft({
  20. output = 'default:stick 6',
  21. recipe = {
  22. {'default:dry_shrub'},
  23. {'default:dry_shrub'},
  24. {'default:dry_shrub'},
  25. }
  26. })
  27. minetest.register_craft({
  28. output = 'default:fence_wood 2',
  29. recipe = {
  30. {'group:stick', 'group:stick', 'group:stick'},
  31. {'group:stick', 'group:stick', 'group:stick'},
  32. }
  33. })
  34. minetest.register_craft({
  35. output = 'default:sign_wall 6',
  36. recipe = {
  37. {'group:wood', 'group:wood', 'group:wood'},
  38. {'group:wood', 'group:wood', 'group:wood'},
  39. {'', 'group:stick', ''},
  40. }
  41. })
  42. minetest.register_craft({
  43. output = 'default:torch 4',
  44. recipe = {
  45. {'default:coal_lump'},
  46. {'group:stick'},
  47. }
  48. })
  49. minetest.register_craft({
  50. output = 'default:pick_wood',
  51. recipe = {
  52. {'group:tree', 'group:tree', 'group:tree'},
  53. {'', 'group:stick', ''},
  54. {'', 'group:stick', ''},
  55. }
  56. })
  57. minetest.register_craft({
  58. output = 'default:pick_wood',
  59. recipe = {
  60. {'group:tree_horizontal', 'group:tree_horizontal', 'group:tree_horizontal'},
  61. {'', 'group:stick', ''},
  62. {'', 'group:stick', ''},
  63. }
  64. })
  65. minetest.register_craft({
  66. output = 'default:pick_stone',
  67. recipe = {
  68. {'default:cobble', 'default:cobble', 'default:cobble'},
  69. {'', 'group:stick', ''},
  70. {'', 'group:stick', ''},
  71. }
  72. })
  73. minetest.register_craft({
  74. output = 'default:pick_copper',
  75. recipe = {
  76. {'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
  77. {'', 'group:stick', ''},
  78. {'', 'group:stick', ''},
  79. }
  80. })
  81. minetest.register_craft({
  82. output = 'default:pick_bronze',
  83. recipe = {
  84. {'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
  85. {'', 'group:stick', ''},
  86. {'', 'group:stick', ''},
  87. }
  88. })
  89. minetest.register_craft({
  90. output = 'default:pick_steel',
  91. recipe = {
  92. {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  93. {'', 'group:stick', ''},
  94. {'', 'group:stick', ''},
  95. }
  96. })
  97. minetest.register_craft({
  98. output = 'default:pick_mese',
  99. recipe = {
  100. {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
  101. {'', 'group:stick', ''},
  102. {'', 'group:stick', ''},
  103. }
  104. })
  105. minetest.register_craft({
  106. output = 'default:shovel_wood',
  107. recipe = {
  108. {'group:tree'},
  109. {'group:stick'},
  110. {'group:stick'},
  111. }
  112. })
  113. minetest.register_craft({
  114. output = 'default:shovel_wood',
  115. recipe = {
  116. {'group:tree_horizontal'},
  117. {'group:stick'},
  118. {'group:stick'},
  119. }
  120. })
  121. minetest.register_craft({
  122. output = 'default:shovel_stone',
  123. recipe = {
  124. {'default:cobble'},
  125. {'group:stick'},
  126. {'group:stick'},
  127. }
  128. })
  129. minetest.register_craft({
  130. output = 'default:shovel_copper',
  131. recipe = {
  132. {'default:copper_ingot'},
  133. {'group:stick'},
  134. {'group:stick'},
  135. }
  136. })
  137. minetest.register_craft({
  138. output = 'default:shovel_bronze',
  139. recipe = {
  140. {'default:bronze_ingot'},
  141. {'group:stick'},
  142. {'group:stick'},
  143. }
  144. })
  145. minetest.register_craft({
  146. output = 'default:shovel_steel',
  147. recipe = {
  148. {'default:steel_ingot'},
  149. {'group:stick'},
  150. {'group:stick'},
  151. }
  152. })
  153. minetest.register_craft({
  154. output = 'default:axe_wood',
  155. recipe = {
  156. {'group:tree', 'group:stick'},
  157. {'group:tree', 'group:stick'},
  158. {'', 'group:stick'},
  159. }
  160. })
  161. minetest.register_craft({
  162. output = 'default:axe_wood',
  163. recipe = {
  164. {'group:tree_horizontal', 'group:stick'},
  165. {'group:tree_horizontal', 'group:stick'},
  166. {'', 'group:stick'},
  167. }
  168. })
  169. minetest.register_craft({
  170. output = 'default:axe_stone',
  171. recipe = {
  172. {'default:cobble', 'group:stick'},
  173. {'default:cobble', 'group:stick'},
  174. {'', 'group:stick'},
  175. }
  176. })
  177. minetest.register_craft({
  178. output = 'default:axe_copper',
  179. recipe = {
  180. {'default:copper_ingot', 'group:stick'},
  181. {'default:copper_ingot', 'group:stick'},
  182. {'', 'group:stick'},
  183. }
  184. })
  185. minetest.register_craft({
  186. output = 'default:axe_bronze',
  187. recipe = {
  188. {'default:bronze_ingot', 'group:stick'},
  189. {'default:bronze_ingot', 'group:stick'},
  190. {'', 'group:stick'},
  191. }
  192. })
  193. minetest.register_craft({
  194. output = 'default:axe_steel',
  195. recipe = {
  196. {'default:steel_ingot', 'group:stick'},
  197. {'default:steel_ingot', 'group:stick'},
  198. {'', 'group:stick'},
  199. }
  200. })
  201. minetest.register_craft({
  202. output = 'default:sword_wood',
  203. recipe = {
  204. {'group:tree'},
  205. {'group:tree'},
  206. {'group:stick'},
  207. }
  208. })
  209. minetest.register_craft({
  210. output = 'default:sword_wood',
  211. recipe = {
  212. {'group:tree_horizontal'},
  213. {'group:tree_horizontal'},
  214. {'group:stick'},
  215. }
  216. })
  217. minetest.register_craft({
  218. output = 'default:sword_stone',
  219. recipe = {
  220. {'default:cobble'},
  221. {'default:cobble'},
  222. {'group:stick'},
  223. }
  224. })
  225. minetest.register_craft({
  226. output = 'default:sword_copper',
  227. recipe = {
  228. {'default:copper_ingot'},
  229. {'default:copper_ingot'},
  230. {'group:stick'},
  231. }
  232. })
  233. minetest.register_craft({
  234. output = 'default:sword_bronze',
  235. recipe = {
  236. {'default:bronze_ingot'},
  237. {'default:bronze_ingot'},
  238. {'group:stick'},
  239. }
  240. })
  241. minetest.register_craft({
  242. output = 'default:sword_steel',
  243. recipe = {
  244. {'default:steel_ingot'},
  245. {'default:steel_ingot'},
  246. {'group:stick'},
  247. }
  248. })
  249. minetest.register_craft({
  250. output = 'default:rail 15',
  251. recipe = {
  252. {'default:steel_ingot', '', 'default:steel_ingot'},
  253. {'default:steel_ingot', 'group:stick', 'default:steel_ingot'},
  254. {'default:steel_ingot', '', 'default:steel_ingot'},
  255. }
  256. })
  257. minetest.register_craft({
  258. output = 'default:chest',
  259. recipe = {
  260. {'group:wood', 'group:wood', 'group:wood'},
  261. {'group:wood', '', 'group:wood'},
  262. {'group:wood', 'group:wood', 'group:wood'},
  263. }
  264. })
  265. minetest.register_craft({
  266. output = 'default:chest_locked',
  267. recipe = {
  268. {'group:wood', 'group:wood', 'group:wood'},
  269. {'group:wood', 'default:steel_ingot', 'group:wood'},
  270. {'group:wood', 'group:wood', 'group:wood'},
  271. }
  272. })
  273. minetest.register_craft({
  274. output = 'default:furnace',
  275. recipe = {
  276. {'default:cobble', 'default:cobble', 'default:cobble'},
  277. {'default:cobble', '', 'default:cobble'},
  278. {'default:cobble', 'default:cobble', 'default:cobble'},
  279. }
  280. })
  281. minetest.register_craft({
  282. output = 'default:clay_furnace',
  283. recipe = {
  284. {'default:clay', 'default:clay', 'default:clay'},
  285. {'default:clay', '', 'default:clay'},
  286. {'default:clay', 'default:clay', 'default:clay'},
  287. }
  288. })
  289. minetest.register_craft({
  290. output = 'default:coalblock',
  291. recipe = {
  292. {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
  293. {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
  294. {'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
  295. }
  296. })
  297. minetest.register_craft({
  298. output = 'default:coal_lump 9',
  299. recipe = {
  300. {'default:coalblock'},
  301. }
  302. })
  303. minetest.register_craft({
  304. output = 'default:steelblock',
  305. recipe = {
  306. {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  307. {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  308. {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  309. }
  310. })
  311. minetest.register_craft({
  312. output = 'default:steel_ingot 9',
  313. recipe = {
  314. {'default:steelblock'},
  315. }
  316. })
  317. minetest.register_craft({
  318. output = 'default:copperblock',
  319. recipe = {
  320. {'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
  321. {'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
  322. {'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
  323. }
  324. })
  325. minetest.register_craft({
  326. output = 'default:copper_ingot 9',
  327. recipe = {
  328. {'default:copperblock'},
  329. }
  330. })
  331. minetest.register_craft({
  332. output = 'default:tinblock',
  333. recipe = {
  334. {'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'},
  335. {'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'},
  336. {'default:tin_ingot', 'default:tin_ingot', 'default:tin_ingot'},
  337. }
  338. })
  339. minetest.register_craft({
  340. output = 'default:tin_ingot 9',
  341. recipe = {
  342. {'default:tinblock'},
  343. }
  344. })
  345. minetest.register_craft({
  346. output = "default:bronze_ingot",
  347. recipe = {
  348. {"default:copper_ingot", "default:tin_ingot"},
  349. }
  350. })
  351. minetest.register_craft({
  352. output = 'default:bronzeblock',
  353. recipe = {
  354. {'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
  355. {'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
  356. {'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
  357. }
  358. })
  359. minetest.register_craft({
  360. output = 'default:bronze_ingot 9',
  361. recipe = {
  362. {'default:bronzeblock'},
  363. }
  364. })
  365. minetest.register_craft({
  366. output = 'default:sandstone',
  367. recipe = {
  368. {'default:sand', 'default:sand'},
  369. {'default:sand', 'default:sand'},
  370. }
  371. })
  372. minetest.register_craft({
  373. output = 'default:sand 4',
  374. recipe = {
  375. {'default:sandstone'},
  376. }
  377. })
  378. minetest.register_craft({
  379. output = 'default:clay',
  380. recipe = {
  381. {'default:clay_lump', 'default:clay_lump'},
  382. {'default:clay_lump', 'default:clay_lump'},
  383. }
  384. })
  385. minetest.register_craft({
  386. output = 'default:clay_lump 4',
  387. recipe = {
  388. {'default:clay'},
  389. }
  390. })
  391. minetest.register_craft({
  392. output = 'default:brick',
  393. recipe = {
  394. {'default:clay_brick', 'default:clay_brick'},
  395. {'default:clay_brick', 'default:clay_brick'},
  396. }
  397. })
  398. minetest.register_craft({
  399. output = 'default:clay_brick 4',
  400. recipe = {
  401. {'default:brick'},
  402. }
  403. })
  404. minetest.register_craft({
  405. output = 'default:stone_crumbled 4',
  406. recipe = {
  407. {'default:cobble'},
  408. }
  409. })
  410. minetest.register_craft({
  411. output = 'default:cobble',
  412. recipe = {
  413. {'default:stone_crumbled', 'default:stone_crumbled'},
  414. {'default:stone_crumbled', 'default:stone_crumbled'},
  415. }
  416. })
  417. minetest.register_craft({
  418. output = 'default:paper',
  419. recipe = {
  420. {'default:papyrus', 'default:papyrus', 'default:papyrus'},
  421. }
  422. })
  423. minetest.register_craft({
  424. output = 'default:book',
  425. recipe = {
  426. {'default:paper'},
  427. {'default:paper'},
  428. {'default:paper'},
  429. }
  430. })
  431. minetest.register_craft({
  432. output = 'default:bookshelf',
  433. recipe = {
  434. {'group:wood', 'group:wood', 'group:wood'},
  435. {'default:book', 'default:book', 'default:book'},
  436. {'group:wood', 'group:wood', 'group:wood'},
  437. }
  438. })
  439. minetest.register_craft({
  440. output = 'default:ladder 2',
  441. recipe = {
  442. {'group:stick', '', 'group:stick'},
  443. {'group:stick', 'group:stick', 'group:stick'},
  444. {'group:stick', '', 'group:stick'},
  445. }
  446. })
  447. minetest.register_craft({
  448. output = 'default:mese',
  449. recipe = {
  450. {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
  451. {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
  452. {'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
  453. }
  454. })
  455. minetest.register_craft({
  456. output = 'default:mese_crystal',
  457. recipe = {
  458. {'default:mese_crystal_fragment', 'default:mese_crystal_fragment', 'default:mese_crystal_fragment'},
  459. {'default:mese_crystal_fragment', 'default:mese_crystal_fragment', 'default:mese_crystal_fragment'},
  460. {'default:mese_crystal_fragment', 'default:mese_crystal_fragment', 'default:mese_crystal_fragment'},
  461. }
  462. })
  463. minetest.register_craft({
  464. output = 'default:mese_crystal 9',
  465. recipe = {
  466. {'default:mese'},
  467. }
  468. })
  469. minetest.register_craft({
  470. output = 'default:mese_crystal_fragment 9',
  471. recipe = {
  472. {'default:mese_crystal'},
  473. }
  474. })
  475. minetest.register_craft({
  476. output = 'default:stonebrick',
  477. recipe = {
  478. {'default:stone', 'default:stone'},
  479. {'default:stone', 'default:stone'},
  480. }
  481. })
  482. minetest.register_craft({
  483. output = 'default:snowblock',
  484. recipe = {
  485. {'default:snow', 'default:snow', 'default:snow'},
  486. {'default:snow', 'default:snow', 'default:snow'},
  487. {'default:snow', 'default:snow', 'default:snow'},
  488. }
  489. })
  490. minetest.register_craft({
  491. output = 'default:snow 9',
  492. recipe = {
  493. {'default:snowblock'},
  494. }
  495. })
  496. --
  497. -- Crafting (tool repair)
  498. --
  499. minetest.register_craft({
  500. type = "toolrepair",
  501. additional_wear = -0.02,
  502. })
  503. --
  504. -- Cooking recipes
  505. --
  506. minetest.register_craft({
  507. type = "cooking",
  508. output = "default:glass",
  509. recipe = "group:sand",
  510. })
  511. minetest.register_craft({
  512. type = "cooking",
  513. output = "default:stone",
  514. recipe = "default:cobble",
  515. })
  516. minetest.register_craft({
  517. type = "cooking",
  518. output = "default:cobble",
  519. recipe = "default:mossycobble",
  520. })
  521. minetest.register_craft({
  522. type = "cooking",
  523. output = "default:steel_ingot",
  524. recipe = "default:iron_lump",
  525. cooktime = 10,
  526. })
  527. minetest.register_craft({
  528. type = "cooking",
  529. output = "default:copper_ingot",
  530. recipe = "default:copper_lump",
  531. })
  532. minetest.register_craft({
  533. type = "cooking",
  534. output = "default:tin_ingot",
  535. recipe = "default:tin_lump",
  536. })
  537. minetest.register_craft({
  538. type = "cooking",
  539. output = "default:clay_brick",
  540. recipe = "default:clay_lump",
  541. })
  542. minetest.register_craft({
  543. type = "cooking",
  544. output = "default:coal_lump",
  545. recipe = "group:tree",
  546. })
  547. --
  548. -- Fuels
  549. --
  550. minetest.register_craft({
  551. type = "fuel",
  552. recipe = "group:tree",
  553. burntime = 30,
  554. })
  555. minetest.register_craft({
  556. type = "fuel",
  557. recipe = "default:junglegrass",
  558. burntime = 2,
  559. })
  560. minetest.register_craft({
  561. type = "fuel",
  562. recipe = "group:leaves",
  563. burntime = 1,
  564. })
  565. minetest.register_craft({
  566. type = "fuel",
  567. recipe = "default:cactus",
  568. burntime = 15,
  569. })
  570. minetest.register_craft({
  571. type = "fuel",
  572. recipe = "default:papyrus",
  573. burntime = 1,
  574. })
  575. minetest.register_craft({
  576. type = "fuel",
  577. recipe = "default:bookshelf",
  578. burntime = 30,
  579. })
  580. minetest.register_craft({
  581. type = "fuel",
  582. recipe = "default:fence_wood",
  583. burntime = 15,
  584. })
  585. minetest.register_craft({
  586. type = "fuel",
  587. recipe = "default:ladder",
  588. burntime = 5,
  589. })
  590. minetest.register_craft({
  591. type = "fuel",
  592. recipe = "group:wood",
  593. burntime = 7,
  594. })
  595. minetest.register_craft({
  596. type = "fuel",
  597. recipe = "default:lava_source",
  598. burntime = 60,
  599. })
  600. minetest.register_craft({
  601. type = "fuel",
  602. recipe = "default:torch",
  603. burntime = 4,
  604. })
  605. minetest.register_craft({
  606. type = "fuel",
  607. recipe = "default:sign_wall",
  608. burntime = 5,
  609. })
  610. minetest.register_craft({
  611. type = "fuel",
  612. recipe = "default:chest",
  613. burntime = 20,
  614. })
  615. minetest.register_craft({
  616. type = "fuel",
  617. recipe = "default:chest_locked",
  618. burntime = 20,
  619. })
  620. minetest.register_craft({
  621. type = "fuel",
  622. recipe = "default:nyancat",
  623. burntime = 1,
  624. })
  625. minetest.register_craft({
  626. type = "fuel",
  627. recipe = "default:nyancat_rainbow",
  628. burntime = 1,
  629. })
  630. minetest.register_craft({
  631. type = "fuel",
  632. recipe = "default:sapling",
  633. burntime = 5,
  634. })
  635. minetest.register_craft({
  636. type = "fuel",
  637. recipe = "default:apple",
  638. burntime = 3,
  639. })
  640. minetest.register_craft({
  641. type = "fuel",
  642. recipe = "default:coal_lump",
  643. burntime = 40,
  644. })
  645. minetest.register_craft({
  646. type = "fuel",
  647. recipe = "default:coalblock",
  648. burntime = 360,
  649. })
  650. minetest.register_craft({
  651. type = "fuel",
  652. recipe = "default:junglesapling",
  653. burntime = 5,
  654. })
  655. minetest.register_craft({
  656. type = "fuel",
  657. recipe = "default:pick_wood",
  658. burntime = 5,
  659. })
  660. minetest.register_craft({
  661. type = "fuel",
  662. recipe = "default:shovel_wood",
  663. burntime = 5,
  664. })
  665. minetest.register_craft({
  666. type = "fuel",
  667. recipe = "default:axe_wood",
  668. burntime = 5,
  669. })
  670. minetest.register_craft({
  671. type = "fuel",
  672. recipe = "default:sword_wood",
  673. burntime = 5,
  674. })
  675. minetest.register_craft({
  676. type = "fuel",
  677. recipe = "default:dry_shrub",
  678. burntime = 5,
  679. })
  680. minetest.register_craft({
  681. type = "fuel",
  682. recipe = "default:fern_1",
  683. burntime = 2,
  684. })