craft.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. return
  16. end
  17. if minetest.get_modpath("mcl_buckets") and
  18. minetest.get_modpath("mcl_mobitems") and
  19. minetest.get_modpath("mcl_core")
  20. then
  21. minetest.register_craft(
  22. {
  23. output = "hot_air_balloons:item",
  24. recipe =
  25. {
  26. {"mcl_mobitems:leather", "mcl_mobitems:leather", "mcl_mobitems:leather"},
  27. {"mcl_mobitems:leather", "bucket:bucket_lava", "mcl_mobitems:leather"},
  28. {"mcl_mobitems:string", "group:wood", "mcl_mobitems:string" },
  29. },
  30. })
  31. return
  32. end
  33. --[[
  34. minetest.register_craft(
  35. {
  36. type = "aircraft"
  37. }
  38. ]]
  39. --make balloon work with mcl2 creative mode
  40. --announce in chat if no crafting recipe was added.
  41. minetest.after(2,
  42. function()
  43. minetest.chat_send_all("Optional dependencies for hot_air_balloons are missing so no crafting recipe was added.\n"..
  44. "Install either 'default' and 'bucket' or 'mcl_core', 'mcl_mobitems' 'and mcl_buckets' if this bothers you.\n"..
  45. "All other functions of the mod should be unaffected by this.")
  46. end)