craft.lua 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. --This file adds crafting recipes depending on which dependencies are installed
  2. if minetest.get_modpath("default") and
  3. minetest.get_modpath("bucket")
  4. then
  5. minetest.register_craft(
  6. {
  7. output = "hot_air_balloons:item",
  8. recipe =
  9. {
  10. {"default:paper", "default:paper", "default:paper"},
  11. {"default:paper", "bucket:bucket_lava", "default:paper"},
  12. {"", "group:wood", "" },
  13. },
  14. })
  15. minetest.register_craft(
  16. {
  17. type = "fuel",
  18. recipe = "hot_air_balloons:item",
  19. burntime = 20,
  20. })
  21. return
  22. end
  23. if minetest.get_modpath("mcl_buckets") and
  24. minetest.get_modpath("mcl_mobitems") and
  25. minetest.get_modpath("mcl_core")
  26. then
  27. minetest.register_craft(
  28. {
  29. output = "hot_air_balloons:item",
  30. recipe =
  31. {
  32. {"mcl_mobitems:leather", "mcl_mobitems:leather", "mcl_mobitems:leather"},
  33. {"mcl_mobitems:leather", "bucket:bucket_lava", "mcl_mobitems:leather"},
  34. {"mcl_mobitems:string", "group:wood", "mcl_mobitems:string" },
  35. },
  36. })
  37. minetest.register_craft(
  38. {
  39. type = "fuel",
  40. recipe = "hot_air_balloons:item",
  41. burntime = 20,
  42. })
  43. return
  44. end
  45. --[[
  46. minetest.register_craft(
  47. {
  48. type = "aircraft"
  49. }
  50. ]]
  51. --make balloon work with mcl2 creative mode
  52. --announce in chat if no crafting recipe was added.
  53. minetest.after(2,
  54. function()
  55. minetest.chat_send_all("Optional dependencies for hot_air_balloons are missing so no crafting recipe was added.\n"..
  56. "Install either 'default' and 'bucket' or 'mcl_core', 'mcl_mobitems' 'and mcl_buckets' if this bothers you.\n"..
  57. "All other functions of the mod should be unaffected by this.")
  58. end)