Add blueberry bushes

This commit is contained in:
random-geek 2018-10-09 12:54:22 -07:00 committed by Paramat
parent 2696b0cd91
commit ab1a79b13c
13 changed files with 162 additions and 2 deletions

View file

@ -81,6 +81,10 @@ function default.grow_sapling(pos)
minetest.log("action", "A bush sapling grows into a bush at "..
minetest.pos_to_string(pos))
default.grow_bush(pos)
elseif node.name == "default:blueberry_bush_sapling" then
minetest.log("action", "A blueberry bush sapling grows into a bush at "..
minetest.pos_to_string(pos))
default.grow_blueberry_bush(pos)
elseif node.name == "default:acacia_bush_sapling" then
minetest.log("action", "An acacia bush sapling grows into a bush at "..
minetest.pos_to_string(pos))
@ -476,6 +480,15 @@ function default.grow_bush(pos)
path, "0", nil, false)
end
-- Blueberry bush
function default.grow_blueberry_bush(pos)
local path = minetest.get_modpath("default") ..
"/schematics/blueberry_bush.mts"
minetest.place_schematic({x = pos.x - 1, y = pos.y, z = pos.z - 1},
path, "0", nil, false)
end
-- Acacia bush