support for fern saplings in plantlife mod (thanks nixnoxus)

This commit is contained in:
tenplus1 2022-01-12 08:19:42 +00:00
parent 2d7dbc735c
commit 79f9cb3294
6 changed files with 31 additions and 9 deletions

View File

@ -33,5 +33,6 @@ Changelog:
- 1.1 - Added {can_bonemeal=1} group for special nodes
- 1.2 - Added support for minetest 5.0 cactus seedling, blueberry bush sapling and emergent jungle tree saplings, additional flowers and pine bush sapling.
- 1.3 - Ability to craft dye from mulch, bonemeal and fertiliser (thanks orbea)
- 1.4 - Add support for fern saplings from plantlife mod (thanks nixnoxus)
Lucky Blocks: 6

View File

@ -7,3 +7,5 @@ technic_worldgen?
lucky_block?
flowers?
dye?
ferns?
dryplants?

View File

@ -689,4 +689,4 @@ minetest.override_item("default:dirt", {
dofile(path .. "/mods.lua")
dofile(path .. "/lucky_block.lua")
print (S("[MOD] bonemeal loaded"))
print ("[MOD] bonemeal loaded")

View File

@ -22,8 +22,7 @@ if minetest.get_modpath("lucky_block") then
{"nod", "default:chest", 0, {
{name = "bonemeal:mulch", max = 20},
{name = "bonemeal:bonemeal", max = 15},
{name = "bonemeal:fertiliser", max = 10},
}},
{name = "bonemeal:fertiliser", max = 10}
}}
})
end

View File

@ -1,4 +1,4 @@
name = bonemeal
depends = default
optional_depends = intllib, lucky_block, farming, ethereal, moretrees, technic_worldgen, flowers, dye
optional_depends = intllib, lucky_block, farming, ethereal, moretrees, technic_worldgen, flowers, dye, ferns, dryplants
description = Adds bone and bonemeal giving the ability to quickly grow plants and saplings.

View File

@ -3,9 +3,8 @@
if minetest.get_modpath("animalmaterials") then
minetest.register_craft({
type = "shapeless",
output = "bonemeal:bonemeal 2",
recipe = {"animalmaterials:bone"}
recipe = {{"animalmaterials:bone"}}
})
end
@ -115,13 +114,11 @@ if minetest.get_modpath("moretrees") then
{"moretrees:apple_tree_sapling", moretrees.spawn_apple_tree_object, "soil"},
{"moretrees:oak_sapling", moretrees.spawn_oak_object, "soil"},
{"moretrees:sequoia_sapling", moretrees.spawn_sequoia_object, "soil"},
--{"moretrees:birch_sapling", moretrees.spawn_birch_object, "soil"},
{"moretrees:birch_sapling", moretrees.grow_birch, "soil"},
{"moretrees:palm_sapling", moretrees.spawn_palm_object, "soil"},
{"moretrees:palm_sapling", moretrees.spawn_palm_object, "sand"},
{"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "soil"},
{"moretrees:date_palm_sapling", moretrees.spawn_date_palm_object, "sand"},
--{"moretrees:spruce_sapling", moretrees.spawn_spruce_object, "soil"},
{"moretrees:spruce_sapling", moretrees.grow_spruce, "soil"},
{"moretrees:cedar_sapling", moretrees.spawn_cedar_object, "soil"},
{"moretrees:poplar_sapling", moretrees.spawn_poplar_object, "soil"},
@ -155,6 +152,29 @@ if minetest.get_modpath("caverealms") then
end
local function y_func(grow_func)
return function(pos)
grow_func({x = pos.x, y = pos.y - 1, z = pos.z})
end
end
if minetest.get_modpath("ferns") then
bonemeal:add_sapling({
{"ferns:sapling_giant_tree_fern", y_func(abstract_ferns.grow_giant_tree_fern), "soil"},
{"ferns:sapling_giant_tree_fern", y_func(abstract_ferns.grow_giant_tree_fern), "sand"},
{"ferns:sapling_tree_fern", y_func(abstract_ferns.grow_tree_fern), "soil"}
})
end
if minetest.get_modpath("dryplants") then
bonemeal:add_sapling({
{"dryplants:reedmace_sapling", y_func(abstract_dryplants.grow_reedmace), "soil"}
})
end
if minetest.get_modpath("dye") then
local bonemeal_dyes = {