Adds mulch, bonemeal and fertilizer to Minetest to quick grow crops and saplings https://content.minetest.net/packages/TenPlus1/bonemeal/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

162 lines
5.1KB

  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. })
  39. end
  40. if minetest.get_modpath("ethereal") then
  41. bonemeal:add_crop({
  42. {"ethereal:strawberry_", 8},
  43. {"ethereal:onion_", 5}
  44. })
  45. bonemeal:add_sapling({
  46. {"ethereal:palm_sapling", ethereal.grow_palm_tree, "soil"},
  47. {"ethereal:palm_sapling", ethereal.grow_palm_tree, "sand"},
  48. {"ethereal:yellow_tree_sapling", ethereal.grow_yellow_tree, "soil"},
  49. {"ethereal:big_tree_sapling", ethereal.grow_big_tree, "soil"},
  50. {"ethereal:banana_tree_sapling", ethereal.grow_banana_tree, "soil"},
  51. {"ethereal:frost_tree_sapling", ethereal.grow_frost_tree, "soil"},
  52. {"ethereal:mushroom_sapling", ethereal.grow_mushroom_tree, "soil"},
  53. {"ethereal:willow_sapling", ethereal.grow_willow_tree, "soil"},
  54. {"ethereal:redwood_sapling", ethereal.grow_redwood_tree, "soil"},
  55. {"ethereal:orange_tree_sapling", ethereal.grow_orange_tree, "soil"},
  56. {"ethereal:bamboo_sprout", ethereal.grow_bamboo_tree, "soil"},
  57. {"ethereal:birch_sapling", ethereal.grow_birch_tree, "soil"},
  58. {"ethereal:sakura_sapling", ethereal.grow_sakura_tree, "soil"}
  59. })
  60. local grass = {"default:grass_3", "default:grass_4", "default:grass_5", ""}
  61. bonemeal:add_deco({
  62. {"ethereal:crystal_dirt", {"ethereal:crystalgrass", "", "", "", ""}, {}},
  63. {"ethereal:fiery_dirt", {"ethereal:dry_shrub", "", "", "", ""}, {}},
  64. {"ethereal:prairie_dirt", grass, {"flowers:dandelion_white",
  65. "flowers:dandelion_yellow", "flowers:geranium", "flowers:rose",
  66. "flowers:tulip", "flowers:viola", "ethereal:strawberry_7"}},
  67. {"ethereal:gray_dirt", {}, {"ethereal:snowygrass", "", ""}},
  68. {"ethereal:cold_dirt", {}, {"ethereal:snowygrass", "", ""}},
  69. {"ethereal:mushroom_dirt", {}, {"flowers:mushroom_red", "flowers:mushroom_brown", "", "", ""}},
  70. {"ethereal:jungle_dirt", grass, {"default:junglegrass", "", "", ""}},
  71. {"ethereal:grove_dirt", grass, {"ethereal:fern", "", "", ""}},
  72. {"ethereal:bamboo_dirt", grass, {}}
  73. })
  74. end
  75. if minetest.get_modpath("moretrees") then
  76. -- special fir check for snow
  77. local function fir_grow(pos)
  78. if minetest.find_node_near(pos, 1,
  79. {"default:snow", "default:snowblock", "default:dirt_with_snow"}) then
  80. moretrees.grow_fir_snow(pos)
  81. else
  82. moretrees.grow_fir(pos)
  83. end
  84. end
  85. bonemeal:add_sapling({
  86. {"moretrees:beech_sapling", moretrees.spawn_beech_object, "soil"},
  87. {"moretrees:apple_tree_sapling", moretrees.spawn_apple_tree_object, "soil"},
  88. {"moretrees:oak_sapling", moretrees.spawn_oak_object, "soil"},
  89. {"moretrees:sequoia_sapling", moretrees.spawn_sequoia_object, "soil"},
  90. --{"moretrees:birch_sapling", moretrees.spawn_birch_object, "soil"},
  91. {"moretrees:birch_sapling", moretrees.grow_birch, "soil"},
  92. {"moretrees:palm_sapling", moretrees.spawn_palm_object, "soil"},
  93. {"moretrees:palm_sapling", moretrees.spawn_palm_object, "sand"},
  94. {"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "soil"},
  95. {"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "sand"},
  96. --{"moretrees:spruce_sapling", moretrees.spawn_spruce_object, "soil"},
  97. {"moretrees:spruce_sapling", moretrees.grow_spruce, "soil"},
  98. {"moretrees:cedar_sapling", moretrees.spawn_cedar_object, "soil"},
  99. {"moretrees:poplar_sapling", moretrees.spawn_poplar_object, "soil"},
  100. {"moretrees:willow_sapling", moretrees.spawn_willow_object, "soil"},
  101. {"moretrees:rubber_tree_sapling", moretrees.spawn_rubber_tree_object, "soil"},
  102. {"moretrees:fir_sapling", fir_grow, "soil"}
  103. })
  104. elseif minetest.get_modpath("technic_worldgen") then
  105. bonemeal:add_sapling({
  106. {"moretrees:rubber_tree_sapling", technic.rubber_tree_model, "soil"}
  107. })
  108. end
  109. if minetest.get_modpath("caverealms") then
  110. local fil = minetest.get_modpath("caverealms") .. "/schematics/shroom.mts"
  111. local add_shroom = function(pos)
  112. minetest.swap_node(pos, {name = "air"})
  113. minetest.place_schematic(
  114. {x = pos.x - 5, y = pos.y, z = pos.z - 5}, fil, 0, nil, false)
  115. end
  116. bonemeal:add_sapling({
  117. {"caverealms:mushroom_sapling", add_shroom, "soil"}
  118. })
  119. end
  120. if minetest.get_modpath("dye") then
  121. local bonemeal_dyes = {
  122. bonemeal = "white", fertiliser = "green", mulch = "brown"}
  123. for mat, dye in pairs(bonemeal_dyes) do
  124. minetest.register_craft({
  125. output = "dye:" .. dye .. " 4",
  126. recipe = {
  127. {"bonemeal:" .. mat}
  128. },
  129. })
  130. end
  131. end