From 9c0a5373f9e4a4e6dd7547c2cfb95a19108c08df Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 10 Feb 2017 21:52:04 +0100 Subject: [PATCH] Don't remove placed flower into flower pot in CM --- mods/mcl_flowerpots/nodes.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mods/mcl_flowerpots/nodes.lua b/mods/mcl_flowerpots/nodes.lua index d78f7d3c78..a615e4eb24 100644 --- a/mods/mcl_flowerpots/nodes.lua +++ b/mods/mcl_flowerpots/nodes.lua @@ -55,16 +55,20 @@ minetest.register_node("mcl_flowerpots:flower_pot", { local flower = row[1] local flower_node = row[2] if item == flower_node then - minetest.set_node(pos, {name="mcl_flowerpots:flower_pot_"..flower}) - itemstack:take_item() + minetest.swap_node(pos, {name="mcl_flowerpots:flower_pot_"..flower}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end end end for _, row in ipairs(cubes) do local flower = row[1] local flower_node = row[2] if item == flower_node then - minetest.set_node(pos, {name="mcl_flowerpots:flower_pot_"..flower}) - itemstack:take_item() + minetest.swap_node(pos, {name="mcl_flowerpots:flower_pot_"..flower}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end end end end,