crafting.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. --[[
  2. More Blocks: crafting recipes
  3. Copyright © 2011-2020 Hugo Locurcio and contributors.
  4. Licensed under the zlib license. See LICENSE.md for more information.
  5. --]]
  6. minetest.register_craft({
  7. output = "default:stick",
  8. recipe = {{"default:dry_shrub"},}
  9. })
  10. minetest.register_craft({
  11. output = "default:stick",
  12. recipe = {{"group:sapling"},}
  13. })
  14. minetest.register_craft({
  15. output = "default:wood",
  16. recipe = {
  17. {"default:stick", "default:stick"},
  18. {"default:stick", "default:stick"},
  19. }
  20. })
  21. minetest.register_craft({
  22. output = "default:dirt_with_grass",
  23. type = "shapeless",
  24. recipe = {"default:junglegrass", "default:dirt"},
  25. })
  26. minetest.register_craft({
  27. output = "default:mossycobble",
  28. type = "shapeless",
  29. recipe = {"default:junglegrass", "default:cobble"},
  30. })
  31. minetest.register_craft({
  32. output = "moreblocks:wood_tile 9",
  33. recipe = {
  34. {"group:wood", "group:wood", "group:wood"},
  35. {"group:wood", "group:wood", "group:wood"},
  36. {"group:wood", "group:wood", "group:wood"},
  37. }
  38. })
  39. -- This must be registered after `moreblocks:wood_tile` to avoid recipe conflicts,
  40. -- since `moreblocks:wood_tile` is part of `group:wood`
  41. minetest.register_craft({
  42. output = "moreblocks:wood_tile_center 9",
  43. recipe = {
  44. {"group:wood", "group:wood", "group:wood"},
  45. {"group:wood", "moreblocks:wood_tile", "group:wood"},
  46. {"group:wood", "group:wood", "group:wood"},
  47. }
  48. })
  49. minetest.register_craft({
  50. type = "shapeless",
  51. output = "moreblocks:wood_tile",
  52. recipe = {"moreblocks:wood_tile_flipped"}
  53. })
  54. minetest.register_craft({
  55. output = "moreblocks:wood_tile_full 4",
  56. recipe = {
  57. {"moreblocks:wood_tile", "moreblocks:wood_tile"},
  58. {"moreblocks:wood_tile", "moreblocks:wood_tile"},
  59. }
  60. })
  61. minetest.register_craft({
  62. output = "moreblocks:wood_tile_offset",
  63. recipe = {
  64. {"default:stick"},
  65. {"moreblocks:wood_tile_center"},
  66. }
  67. })
  68. minetest.register_craft({
  69. type = "shapeless",
  70. output = "moreblocks:wood_tile_offset",
  71. recipe = {"moreblocks:wood_tile_down"}
  72. })
  73. minetest.register_craft({
  74. type = "shapeless",
  75. output = "moreblocks:wood_tile_offset",
  76. recipe = {"moreblocks:wood_tile_left"}
  77. })
  78. minetest.register_craft({
  79. type = "shapeless",
  80. output = "moreblocks:wood_tile_offset",
  81. recipe = {"moreblocks:wood_tile_right"}
  82. })
  83. minetest.register_craft({
  84. output = "moreblocks:circle_stone_bricks 5",
  85. recipe = {
  86. {"", "default:stone", ""},
  87. {"default:stone", "default:coal_lump", "default:stone"},
  88. {"", "default:stone", ""},
  89. }
  90. })
  91. minetest.register_craft({
  92. output = "moreblocks:all_faces_tree 8",
  93. recipe = {
  94. {"default:tree", "default:tree", "default:tree"},
  95. {"default:tree", "", "default:tree"},
  96. {"default:tree", "default:tree", "default:tree"},
  97. }
  98. })
  99. minetest.register_craft({
  100. output = "moreblocks:all_faces_jungle_tree 8",
  101. recipe = {
  102. {"default:jungletree", "default:jungletree", "default:jungletree"},
  103. {"default:jungletree", "", "default:jungletree"},
  104. {"default:jungletree", "default:jungletree", "default:jungletree"},
  105. }
  106. })
  107. minetest.register_craft({
  108. output = "moreblocks:all_faces_pine_tree 8",
  109. recipe = {
  110. {"default:pine_tree", "default:pine_tree", "default:pine_tree"},
  111. {"default:pine_tree", "", "default:pine_tree"},
  112. {"default:pine_tree", "default:pine_tree", "default:pine_tree"},
  113. }
  114. })
  115. minetest.register_craft({
  116. output = "moreblocks:all_faces_acacia_tree 8",
  117. recipe = {
  118. {"default:acacia_tree", "default:acacia_tree", "default:acacia_tree"},
  119. {"default:acacia_tree", "", "default:acacia_tree"},
  120. {"default:acacia_tree", "default:acacia_tree", "default:acacia_tree"},
  121. }
  122. })
  123. minetest.register_craft({
  124. output = "moreblocks:all_faces_aspen_tree 8",
  125. recipe = {
  126. {"default:aspen_tree", "default:aspen_tree", "default:aspen_tree"},
  127. {"default:aspen_tree", "", "default:aspen_tree"},
  128. {"default:aspen_tree", "default:aspen_tree", "default:aspen_tree"},
  129. }
  130. })
  131. minetest.register_craft({
  132. output = "moreblocks:sweeper 4",
  133. recipe = {
  134. {"default:junglegrass"},
  135. {"default:stick"},
  136. }
  137. })
  138. minetest.register_craft({
  139. output = "moreblocks:stone_tile 9",
  140. recipe = {
  141. {"default:cobble", "default:cobble", "default:cobble"},
  142. {"default:cobble", "default:stone", "default:cobble"},
  143. {"default:cobble", "default:cobble", "default:cobble"},
  144. }
  145. })
  146. minetest.register_craft({
  147. output = "moreblocks:split_stone_tile",
  148. recipe = {
  149. {"moreblocks:stone_tile"},
  150. }
  151. })
  152. minetest.register_craft({
  153. output = "moreblocks:checker_stone_tile",
  154. recipe = {
  155. {"moreblocks:split_stone_tile"},
  156. }
  157. })
  158. -- When approaching the below craft, loop back to cobblestone, which can then be used to craft stone tiles again
  159. minetest.register_craft({
  160. output = "default:cobble",
  161. recipe = {
  162. {"moreblocks:checker_stone_tile"},
  163. }
  164. })
  165. minetest.register_craft({
  166. output = "moreblocks:grey_bricks 2",
  167. type = "shapeless",
  168. recipe = {"default:stone", "default:brick"},
  169. })
  170. minetest.register_craft({
  171. output = "moreblocks:grey_bricks 2",
  172. type = "shapeless",
  173. recipe = {"default:stonebrick", "default:brick"},
  174. })
  175. minetest.register_craft({
  176. output = "moreblocks:empty_shelf",
  177. type = "shapeless",
  178. recipe = {"moreblocks:sweeper", "default:bookshelf"},
  179. replacements = {{"default:bookshelf", "default:book 3"}},
  180. -- When obtaining an empty shelf, return the books used in it as well
  181. })
  182. minetest.register_craft({
  183. output = "moreblocks:empty_shelf",
  184. type = "shapeless",
  185. recipe = {"moreblocks:sweeper", "vessels:shelf"},
  186. replacements = {{"vessels:shelf", "vessels:glass_bottle 3"}},
  187. })
  188. minetest.register_craft({
  189. type = "shapeless",
  190. output = "default:bookshelf",
  191. recipe = {"moreblocks:empty_shelf", "default:book", "default:book", "default:book"},
  192. })
  193. minetest.register_craft({
  194. output = "moreblocks:empty_shelf",
  195. recipe = {
  196. {"group:wood", "group:wood", "group:wood"},
  197. {"", "", ""},
  198. {"group:wood", "group:wood", "group:wood"},
  199. }
  200. })
  201. minetest.register_craft({
  202. output = "moreblocks:coal_stone_bricks 4",
  203. recipe = {
  204. {"moreblocks:coal_stone", "moreblocks:coal_stone"},
  205. {"moreblocks:coal_stone", "moreblocks:coal_stone"},
  206. }
  207. })
  208. minetest.register_craft({
  209. output = "moreblocks:iron_stone_bricks 4",
  210. recipe = {
  211. {"moreblocks:iron_stone", "moreblocks:iron_stone"},
  212. {"moreblocks:iron_stone", "moreblocks:iron_stone"},
  213. }
  214. })
  215. minetest.register_craft({
  216. output = "moreblocks:plankstone 4",
  217. recipe = {
  218. {"group:stone", "group:wood"},
  219. {"group:wood", "group:stone"},
  220. }
  221. })
  222. minetest.register_craft({
  223. output = "moreblocks:plankstone 4",
  224. recipe = {
  225. {"group:wood", "group:stone"},
  226. {"group:stone", "group:wood"},
  227. }
  228. })
  229. minetest.register_craft({
  230. output = "moreblocks:coal_checker 4",
  231. recipe = {
  232. {"default:stone", "default:coal_lump"},
  233. {"default:coal_lump", "default:stone"},
  234. }
  235. })
  236. minetest.register_craft({
  237. output = "moreblocks:coal_checker 4",
  238. recipe = {
  239. {"default:coal_lump", "default:stone"},
  240. {"default:stone", "default:coal_lump"},
  241. }
  242. })
  243. minetest.register_craft({
  244. output = "moreblocks:iron_checker 4",
  245. recipe = {
  246. {"default:steel_ingot", "default:stone"},
  247. {"default:stone", "default:steel_ingot"},
  248. }
  249. })
  250. minetest.register_craft({
  251. output = "moreblocks:iron_checker 4",
  252. recipe = {
  253. {"default:stone", "default:steel_ingot"},
  254. {"default:steel_ingot", "default:stone"},
  255. }
  256. })
  257. minetest.register_craft({
  258. output = "default:chest_locked",
  259. type = "shapeless",
  260. recipe = {"default:steel_ingot", "default:chest"},
  261. })
  262. minetest.register_craft({
  263. output = "default:chest_locked",
  264. type = "shapeless",
  265. recipe = {"default:copper_ingot", "default:chest"},
  266. })
  267. minetest.register_craft({
  268. output = "default:chest_locked",
  269. type = "shapeless",
  270. recipe = {"default:bronze_ingot", "default:chest"},
  271. })
  272. minetest.register_craft({
  273. output = "default:chest_locked",
  274. type = "shapeless",
  275. recipe = {"default:gold_ingot", "default:chest"},
  276. })
  277. minetest.register_craft({
  278. output = "moreblocks:iron_glass",
  279. type = "shapeless",
  280. recipe = {"default:steel_ingot", "default:glass"},
  281. })
  282. minetest.register_craft({
  283. output = "default:glass",
  284. type = "shapeless",
  285. recipe = {"default:coal_lump", "moreblocks:iron_glass"},
  286. })
  287. minetest.register_craft({
  288. output = "moreblocks:coal_glass",
  289. type = "shapeless",
  290. recipe = {"default:coal_lump", "default:glass"},
  291. })
  292. minetest.register_craft({
  293. output = "default:glass",
  294. type = "shapeless",
  295. recipe = {"default:steel_ingot", "moreblocks:coal_glass"},
  296. })
  297. minetest.register_craft({
  298. output = "moreblocks:clean_glass",
  299. type = "shapeless",
  300. recipe = {"moreblocks:sweeper", "default:glass"},
  301. })
  302. minetest.register_craft({
  303. output = "moreblocks:glow_glass",
  304. type = "shapeless",
  305. recipe = {"default:torch", "default:glass"},
  306. })
  307. minetest.register_craft({
  308. output = "moreblocks:trap_glow_glass",
  309. type = "shapeless",
  310. recipe = {"default:mese_crystal_fragment", "default:glass", "default:torch"},
  311. })
  312. minetest.register_craft({
  313. output = "moreblocks:trap_glow_glass",
  314. type = "shapeless",
  315. recipe = {"default:mese_crystal_fragment", "moreblocks:glow_glass"},
  316. })
  317. minetest.register_craft({
  318. output = "moreblocks:super_glow_glass",
  319. type = "shapeless",
  320. recipe = {"default:torch", "default:torch", "default:glass"},
  321. })
  322. minetest.register_craft({
  323. output = "moreblocks:super_glow_glass",
  324. type = "shapeless",
  325. recipe = {"default:torch", "moreblocks:glow_glass"},
  326. })
  327. minetest.register_craft({
  328. output = "moreblocks:trap_super_glow_glass",
  329. type = "shapeless",
  330. recipe = {"default:mese_crystal_fragment", "default:glass", "default:torch", "default:torch"},
  331. })
  332. minetest.register_craft({
  333. output = "moreblocks:trap_super_glow_glass",
  334. type = "shapeless",
  335. recipe = {"default:mese_crystal_fragment", "moreblocks:super_glow_glass"},
  336. })
  337. minetest.register_craft({
  338. output = "moreblocks:coal_stone",
  339. type = "shapeless",
  340. recipe = {"default:coal_lump", "default:stone"},
  341. })
  342. minetest.register_craft({
  343. output = "default:stone",
  344. type = "shapeless",
  345. recipe = {"default:steel_ingot", "moreblocks:coal_stone"},
  346. })
  347. minetest.register_craft({
  348. output = "moreblocks:iron_stone",
  349. type = "shapeless",
  350. recipe = {"default:steel_ingot", "default:stone"},
  351. })
  352. minetest.register_craft({
  353. output = "default:stone",
  354. type = "shapeless",
  355. recipe = {"default:coal_lump", "moreblocks:iron_stone"},
  356. })
  357. minetest.register_craft({
  358. output = "moreblocks:trap_stone",
  359. type = "shapeless",
  360. recipe = {"default:mese_crystal_fragment", "default:stone"},
  361. })
  362. minetest.register_craft({
  363. output = "moreblocks:trap_desert_stone",
  364. type = "shapeless",
  365. recipe = {"default:mese_crystal_fragment", "default:desert_stone"},
  366. })
  367. minetest.register_craft({
  368. output = "moreblocks:trap_glass",
  369. type = "shapeless",
  370. recipe = {"default:mese_crystal_fragment", "default:glass"},
  371. })
  372. minetest.register_craft({
  373. output = "moreblocks:trap_obsidian_glass",
  374. type = "shapeless",
  375. recipe = {"default:mese_crystal_fragment", "default:obsidian_glass"},
  376. })
  377. minetest.register_craft({
  378. output = "moreblocks:trap_obsidian",
  379. type = "shapeless",
  380. recipe = {"default:mese_crystal_fragment", "default:obsidian"},
  381. })
  382. minetest.register_craft({
  383. output = "moreblocks:trap_sandstone",
  384. type = "shapeless",
  385. recipe = {"default:mese_crystal_fragment", "default:sandstone"},
  386. })
  387. minetest.register_craft({
  388. output = "moreblocks:cactus_brick",
  389. type = "shapeless",
  390. recipe = {"default:cactus", "default:brick"},
  391. })
  392. minetest.register_craft({
  393. output = "moreblocks:cactus_checker 4",
  394. recipe = {
  395. {"default:cactus", "default:stone"},
  396. {"default:stone", "default:cactus"},
  397. }
  398. })
  399. minetest.register_craft({
  400. output = "moreblocks:cactuschecker 4",
  401. recipe = {
  402. {"default:stone", "default:cactus"},
  403. {"default:cactus", "default:stone"},
  404. }
  405. })
  406. minetest.register_craft({
  407. output = "moreblocks:rope 3",
  408. recipe = {
  409. {"default:junglegrass"},
  410. {"default:junglegrass"},
  411. {"default:junglegrass"},
  412. }
  413. })
  414. minetest.register_craft({
  415. output = "moreblocks:dirt_compressed",
  416. recipe = {
  417. {'default:dirt', 'default:dirt', 'default:dirt'},
  418. {'default:dirt', 'default:dirt', 'default:dirt'},
  419. {'default:dirt', 'default:dirt', 'default:dirt'},
  420. }
  421. })
  422. minetest.register_craft({
  423. output = "default:dirt 9",
  424. recipe = {{"moreblocks:dirt_compressed"}},
  425. })
  426. minetest.register_craft({
  427. output = "moreblocks:cobble_compressed",
  428. recipe = {
  429. {"default:cobble", "default:cobble", "default:cobble"},
  430. {"default:cobble", "default:cobble", "default:cobble"},
  431. {"default:cobble", "default:cobble", "default:cobble"},
  432. }
  433. })
  434. minetest.register_craft({
  435. output = "default:cobble 9",
  436. recipe = {
  437. {"moreblocks:cobble_compressed"},
  438. }
  439. })
  440. minetest.register_craft({
  441. type = "cooking", output = "moreblocks:tar", recipe = "default:pine_tree",
  442. })
  443. minetest.register_craft({
  444. type = "shapeless",
  445. output = "moreblocks:copperpatina",
  446. recipe = {"group:water_bucket", "default:copperblock"},
  447. replacements = {
  448. {"group:water_bucket", "bucket:bucket_empty"}
  449. }
  450. })
  451. minetest.register_craft({
  452. output = "default:copper_ingot 9",
  453. recipe = {
  454. {"moreblocks:copperpatina"},
  455. }
  456. })
  457. if minetest.settings:get_bool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
  458. minetest.register_craft({
  459. output = "moreblocks:circular_saw",
  460. recipe = {
  461. { "", "default:steel_ingot", "" },
  462. { "group:wood", "group:wood", "group:wood"},
  463. { "group:wood", "", "group:wood"},
  464. }
  465. })
  466. end