mods.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. -- craft bones from animalmaterials into bonemeal
  2. if minetest.get_modpath("animalmaterials") then
  3. minetest.register_craft({
  4. type = "shapeless",
  5. output = "bonemeal:bonemeal 2",
  6. recipe = {"animalmaterials:bone"}
  7. })
  8. end
  9. if farming and farming.mod and farming.mod == "redo" then
  10. bonemeal:add_crop({
  11. {"farming:tomato_", 8},
  12. {"farming:corn_", 8},
  13. {"farming:melon_", 8},
  14. {"farming:pumpkin_", 8},
  15. {"farming:beanpole_", 5},
  16. {"farming:blueberry_", 4},
  17. {"farming:raspberry_", 4},
  18. {"farming:carrot_", 8},
  19. {"farming:cocoa_", 4},
  20. {"farming:coffee_", 5},
  21. {"farming:cucumber_", 4},
  22. {"farming:potato_", 4},
  23. {"farming:grapes_", 8},
  24. {"farming:rhubarb_", 3},
  25. {"farming:barley_", 7},
  26. {"farming:hemp_", 8},
  27. {"farming:chili_", 8},
  28. {"farming:garlic_", 5},
  29. {"farming:onion_", 5},
  30. {"farming:pepper_", 5},
  31. {"farming:pineapple_", 8},
  32. {"farming:pea_", 5},
  33. {"farming:beetroot_", 5},
  34. {"farming:rye_", 8},
  35. {"farming:oat_", 8},
  36. {"farming:rice_", 8},
  37. {"farming:mint_", 4},
  38. {"farming:cabbage_", 6}
  39. })
  40. end
  41. if minetest.get_modpath("ethereal") then
  42. bonemeal:add_crop({
  43. {"ethereal:strawberry_", 8},
  44. {"ethereal:onion_", 5}
  45. })
  46. bonemeal:add_sapling({
  47. {"ethereal:palm_sapling", ethereal.grow_palm_tree, "soil"},
  48. {"ethereal:palm_sapling", ethereal.grow_palm_tree, "sand"},
  49. {"ethereal:yellow_tree_sapling", ethereal.grow_yellow_tree, "soil"},
  50. {"ethereal:big_tree_sapling", ethereal.grow_big_tree, "soil"},
  51. {"ethereal:banana_tree_sapling", ethereal.grow_banana_tree, "soil"},
  52. {"ethereal:frost_tree_sapling", ethereal.grow_frost_tree, "soil"},
  53. {"ethereal:mushroom_sapling", ethereal.grow_mushroom_tree, "soil"},
  54. {"ethereal:willow_sapling", ethereal.grow_willow_tree, "soil"},
  55. {"ethereal:redwood_sapling", ethereal.grow_redwood_tree, "soil"},
  56. {"ethereal:orange_tree_sapling", ethereal.grow_orange_tree, "soil"},
  57. {"ethereal:bamboo_sprout", ethereal.grow_bamboo_tree, "soil"},
  58. {"ethereal:birch_sapling", ethereal.grow_birch_tree, "soil"},
  59. {"ethereal:sakura_sapling", ethereal.grow_sakura_tree, "soil"}
  60. })
  61. local grass = {"default:grass_3", "default:grass_4", "default:grass_5", ""}
  62. bonemeal:add_deco({
  63. {"ethereal:crystal_dirt", {"ethereal:crystalgrass", "", "", "", ""}, {}},
  64. {"ethereal:fiery_dirt", {"ethereal:dry_shrub", "", "", "", ""}, {}},
  65. {"ethereal:prairie_dirt", grass, {"flowers:dandelion_white",
  66. "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose",
  67. "flowers:tulip", "flowers:viola", "ethereal:strawberry_7"}},
  68. {"ethereal:gray_dirt", {}, {"ethereal:snowygrass", "", ""}},
  69. {"ethereal:cold_dirt", {}, {"ethereal:snowygrass", "", ""}},
  70. {"ethereal:mushroom_dirt", {}, {"flowers:mushroom_red", "flowers:mushroom_brown", "", "", ""}},
  71. {"ethereal:jungle_dirt", grass, {"default:junglegrass", "", "", ""}},
  72. {"ethereal:grove_dirt", grass, {"ethereal:fern", "", "", ""}},
  73. {"ethereal:bamboo_dirt", grass, {}}
  74. })
  75. end
  76. if minetest.get_modpath("moretrees") then
  77. -- special fir check for snow
  78. local function fir_grow(pos)
  79. if minetest.find_node_near(pos, 1,
  80. {"default:snow", "default:snowblock", "default:dirt_with_snow"}) then
  81. moretrees.grow_fir_snow(pos)
  82. else
  83. moretrees.grow_fir(pos)
  84. end
  85. end
  86. bonemeal:add_sapling({
  87. {"moretrees:beech_sapling", moretrees.spawn_beech_object, "soil"},
  88. {"moretrees:apple_tree_sapling", moretrees.spawn_apple_tree_object, "soil"},
  89. {"moretrees:oak_sapling", moretrees.spawn_oak_object, "soil"},
  90. {"moretrees:sequoia_sapling", moretrees.spawn_sequoia_object, "soil"},
  91. --{"moretrees:birch_sapling", moretrees.spawn_birch_object, "soil"},
  92. {"moretrees:birch_sapling", moretrees.grow_birch, "soil"},
  93. {"moretrees:palm_sapling", moretrees.spawn_palm_object, "soil"},
  94. {"moretrees:palm_sapling", moretrees.spawn_palm_object, "sand"},
  95. {"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "soil"},
  96. {"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "sand"},
  97. --{"moretrees:spruce_sapling", moretrees.spawn_spruce_object, "soil"},
  98. {"moretrees:spruce_sapling", moretrees.grow_spruce, "soil"},
  99. {"moretrees:cedar_sapling", moretrees.spawn_cedar_object, "soil"},
  100. {"moretrees:poplar_sapling", moretrees.spawn_poplar_object, "soil"},
  101. {"moretrees:willow_sapling", moretrees.spawn_willow_object, "soil"},
  102. {"moretrees:rubber_tree_sapling", moretrees.spawn_rubber_tree_object, "soil"},
  103. {"moretrees:fir_sapling", fir_grow, "soil"}
  104. })
  105. elseif minetest.get_modpath("technic_worldgen") then
  106. bonemeal:add_sapling({
  107. {"moretrees:rubber_tree_sapling", technic.rubber_tree_model, "soil"}
  108. })
  109. end
  110. if minetest.get_modpath("caverealms") then
  111. local fil = minetest.get_modpath("caverealms") .. "/schematics/shroom.mts"
  112. local add_shroom = function(pos)
  113. minetest.swap_node(pos, {name = "air"})
  114. minetest.place_schematic(
  115. {x = pos.x - 5, y = pos.y, z = pos.z - 5}, fil, 0, nil, false)
  116. end
  117. bonemeal:add_sapling({
  118. {"caverealms:mushroom_sapling", add_shroom, "soil"}
  119. })
  120. end
  121. if minetest.get_modpath("dye") then
  122. local bonemeal_dyes = {
  123. bonemeal = "white", fertiliser = "green", mulch = "brown"}
  124. for mat, dye in pairs(bonemeal_dyes) do
  125. minetest.register_craft({
  126. output = "dye:" .. dye .. " 4",
  127. recipe = {
  128. {"bonemeal:" .. mat}
  129. },
  130. })
  131. end
  132. end