From 34e8c4a106a201152506ade464c55c863b25e65e Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sun, 23 Jul 2023 18:57:09 +0100 Subject: [PATCH] added bush_classics support --- README.md | 1 + mods.lua | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index 48cd7fd..9a97f2a 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,7 @@ https://forum.minetest.net/viewtopic.php?f=9&t=16446 * Update readme (thanks mckaygerhard) * Recipe changes, player bones craft into 2x bones, bones must be cooked to give bonemeal +* Added bushes_classic support ## LICENSE diff --git a/mods.lua b/mods.lua index cf98c0d..724cfeb 100644 --- a/mods.lua +++ b/mods.lua @@ -327,3 +327,19 @@ if minetest.get_modpath("everness") then {"everness:willow_tree_sapling", Everness.grow_willow_tree, "soil"} }) end + + +if minetest.get_modpath("bushes_classic") then + + local function grow_bush(pos) + + local meta = minetest.get_meta(pos) + local bush_name = meta:get_string("bush_type") or "strawberry" + + minetest.swap_node(pos, {name = "bushes:" .. bush_name .. "_bush"}) + end + + bonemeal:add_sapling({ + {"bushes:fruitless_bush", grow_bush, "soil"}, + }) +end