mods.lua 4.8 KB

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