if no meta dont change bush

This commit is contained in:
tenplus1 2023-07-24 07:21:55 +01:00
parent 10dbedd1e8
commit 6d21268470
1 changed files with 3 additions and 5 deletions

View File

@ -336,12 +336,10 @@ if minetest.get_modpath("bushes_classic") then
local meta = minetest.get_meta(pos)
local bush_name = meta:get_string("bush_type")
-- default if no meta
if not bush_name or bush_name == "" then
bush_name = "strawberry"
-- only change if meta found
if meta and bush_name then
minetest.swap_node(pos, {name = "bushes:" .. bush_name .. "_bush"})
end
minetest.swap_node(pos, {name = "bushes:" .. bush_name .. "_bush"})
end
bonemeal:add_sapling({