Incorporate applying bonemeal to Bamboo stalks.

This commit is contained in:
Michieal 2023-01-04 22:49:17 -05:00
parent 65aa956d9c
commit 687887fe27
1 changed files with 56 additions and 46 deletions

View File

@ -191,7 +191,9 @@ local function apply_bone_meal(pointed_thing,user)
local pos = pointed_thing.under local pos = pointed_thing.under
local n = minetest.get_node(pos) local n = minetest.get_node(pos)
if n.name == "" then return false end if n.name == "" then
return false
end
for _, func in pairs(mcl_dye.bone_meal_callbacks) do for _, func in pairs(mcl_dye.bone_meal_callbacks) do
if func(pointed_thing, user) then if func(pointed_thing, user) then
@ -364,6 +366,14 @@ local function apply_bone_meal(pointed_thing,user)
return true return true
end end
-- Handle applying bonemeal to bamboo.
elseif mcl_bamboo.is_bamboo(n.name) then
local success = mcl_bamboo.grow_bamboo(pos, true)
if success then
mcl_dye.add_bone_meal_particle(pos)
end
return success
elseif n.name == "mcl_flowers:fern" then elseif n.name == "mcl_flowers:fern" then
mcl_dye.add_bone_meal_particle(pos) mcl_dye.add_bone_meal_particle(pos)
-- Fern: Grow into large fern -- Fern: Grow into large fern