From 5f81c3dfa265350313b8fcf80b0728f66bd11743 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Thu, 30 Jun 2022 09:12:11 +0100 Subject: [PATCH] add initial support for dfcavern saplings --- depends.txt | 1 + mod.conf | 2 +- mods.lua | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/depends.txt b/depends.txt index 2ef3ad6..5bdcc1f 100644 --- a/depends.txt +++ b/depends.txt @@ -9,3 +9,4 @@ flowers? dye? ferns? dryplants? +df_trees? diff --git a/mod.conf b/mod.conf index 650af82..7f91a15 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ name = bonemeal depends = default -optional_depends = intllib, lucky_block, farming, ethereal, moretrees, technic_worldgen, flowers, dye, ferns, dryplants +optional_depends = intllib, lucky_block, farming, ethereal, moretrees, technic_worldgen, flowers, dye, ferns, dryplants, df_trees description = Adds bone and bonemeal giving the ability to quickly grow plants and saplings. diff --git a/mods.lua b/mods.lua index be9c0ad..1cee64c 100644 --- a/mods.lua +++ b/mods.lua @@ -190,3 +190,21 @@ if minetest.get_modpath("dye") then }) end end + + +if minetest.get_modpath("df_trees") then + + local function spore_tree_fix(pos) + minetest.set_node(pos, {name = "air"}) + df_trees.spawn_spore_tree(pos) + end + + bonemeal:add_sapling({ + {"df_trees:black_cap_sapling", df_trees.spawn_black_cap, "soil"}, + {"df_trees:fungiwood_sapling", df_trees.spawn_fungiwood, "soil"}, + {"df_trees:goblin_cap_sapling", df_trees.spawn_goblin_cap, "soil"}, + {"df_trees:spore_tree_sapling", spore_tree_fix, "soil"}, + {"df_trees:tower_cap_sapling", df_trees.spawn_tower_cap, "soil"}, + {"df_trees:tunnel_tube_sapling", df_trees.spawn_tunnel_tube, "soil"} + }) +end