From 15c4f5bf2a743dbc4f15949fd536a07e6b6a6490 Mon Sep 17 00:00:00 2001 From: kabou Date: Sun, 1 May 2022 00:05:30 +0200 Subject: [PATCH] Add bonemealing callback for double flowers. * Adds a _mcl_on_bonemealing callback to the double flowers. --- mods/ITEMS/mcl_flowers/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mods/ITEMS/mcl_flowers/init.lua b/mods/ITEMS/mcl_flowers/init.lua index 680be17c9..c13858106 100644 --- a/mods/ITEMS/mcl_flowers/init.lua +++ b/mods/ITEMS/mcl_flowers/init.lua @@ -208,10 +208,16 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im if name == "double_grass" then bottom_groups.compostability = 50 end + local on_bonemealing if is_flower then bottom_groups.flower = 1 bottom_groups.place_flowerlike = 1 bottom_groups.dig_immediate = 3 + on_bonemealing = function(pointed_thing, placer) + local pos = pointed_thing.under + minetest.add_item(pos, "mcl_flowers:"..name) + return true + end else bottom_groups.place_flowerlike = 2 bottom_groups.handy = 1 @@ -329,6 +335,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im minetest.remove_node(top) end end, + _mcl_on_bonemealing = on_bonemealing, groups = bottom_groups, sounds = mcl_sounds.node_sound_leaves_defaults(), }) @@ -365,6 +372,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im minetest.remove_node(bottom) end end, + _mcl_on_bonemealing = on_bonemealing, groups = top_groups, sounds = mcl_sounds.node_sound_leaves_defaults(), })