nutella.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. minetest.register_node("sandwiches:noyella_block", {
  2. description = "Noyella block",
  3. groups = {snappy = 1 , oddly_breakable_by_hand = 3, not_in_creative_inventory=1, flammable = 1},
  4. paramtype2 = "facedir",
  5. tiles = {"noyella_block_top.png",
  6. "noyella_block_bottom.png",
  7. "noyella_block_side.png",
  8. "noyella_block_side.png",
  9. "noyella_block_side.png",
  10. "noyella_block_front.png"
  11. },
  12. sounds = default.node_sound_glass_defaults(),
  13. })
  14. minetest.register_craftitem("sandwiches:noyella_sandwich", {
  15. description = "noyella sandwich",
  16. on_use = minetest.item_eat(8, "sandwiches:bread_crumbs"),
  17. groups = {food_sandwich = 1},
  18. inventory_image = "noyella_sandwich.png"
  19. })
  20. minetest.register_craftitem("sandwiches:noyella_spread", {
  21. description = "Noyella spread",
  22. on_use = minetest.item_eat(2),
  23. groups = {food_nutella = 1, food_noyella = 1, food_chocolate_spead = 1, flammable = 1},
  24. inventory_image = "noyella_spread.png"
  25. })
  26. -- CRAFTS --
  27. minetest.register_craft({
  28. output = "sandwiches:noyella_sandwich",
  29. recipe = {
  30. {"", "sandwiches:bread_slice", ""},
  31. {"sandwiches:noyella_spread", "sandwiches:noyella_spread", "sandwiches:noyella_spread"},
  32. {"", "sandwiches:bread_slice", ""},
  33. }
  34. })
  35. minetest.register_craft({
  36. output = "sandwiches:noyella_spread 5",
  37. type = "shapeless",
  38. recipe = {
  39. "farming:cocoa_beans", "farming:cocoa_beans", "farming:cocoa_beans",
  40. "group:food_sugar", "group:food_sugar", "group:food_sugar",
  41. "moretrees:acorn", "moretrees:acorn", "moretrees:acorn",
  42. }
  43. })
  44. if minetest.get_modpath("x_farming") then
  45. minetest.register_craft({
  46. output = "sandwiches:noyella_spread 5",
  47. type = "shapeless",
  48. recipe = {
  49. "x_farming:cocoa_bean", "x_farming:cocoa_bean", "x_farming:cocoa_bean",
  50. "group:food_sugar", "group:food_sugar", "group:food_sugar",
  51. "moretrees:acorn", "moretrees:acorn", "moretrees:acorn",
  52. }
  53. })
  54. end -- if x_farming is present
  55. if minetest.get_modpath("cacaotree")then
  56. minetest.register_craft({
  57. output = "sandwiches:noyella_spread 5",
  58. type = "shapeless",
  59. recipe = {
  60. "cacaotree:cacao_beans", "cacaotree:cacao_beans", "cacaotree:cacao_beans",
  61. "group:food_sugar", "group:food_sugar", "group:food_sugar",
  62. "moretrees:acorn", "moretrees:acorn", "moretrees:acorn",
  63. }
  64. })
  65. minetest.register_craft({
  66. output = "sandwiches:noyella_spread 5",
  67. type = "shapeless",
  68. recipe = {
  69. "cacaotree:cacao_beans", "cacaotree:cacao_beans", "cacaotree:cacao_beans",
  70. "x_farming:sugar", "x_farming:sugar", "x_farming:sugar",
  71. "moretrees:acorn", "moretrees:acorn", "moretrees:acorn",
  72. }
  73. })
  74. end -- if cool_trees with cacaotree is present
  75. minetest.register_craft({
  76. output = "sandwiches:noyella_block",
  77. recipe = {
  78. {"sandwiches:noyella_spread", "sandwiches:noyella_spread", "sandwiches:noyella_spread"},
  79. {"sandwiches:noyella_spread", "sandwiches:noyella_spread", "sandwiches:noyella_spread"},
  80. {"sandwiches:noyella_spread", "sandwiches:noyella_spread", "sandwiches:noyella_spread"}
  81. }
  82. })
  83. minetest.register_craft({
  84. output = "sandwiches:noyella_spread 9",
  85. type = "shapeless",
  86. recipe = {"sandwiches:noyella_block"}
  87. })
  88. minetest.register_alias("sandwiches:nutella_block", "sandwiches:noyella_block")
  89. minetest.register_alias("sandwiches:acorn_nutella", "sandwiches:noyella_spread")
  90. minetest.register_alias("sandwiches:nutella_sandwich", "sandwiches:noyella_sandwich")