diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index 86ef7f1362..49045c4fd5 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -222,21 +222,8 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", { -- Add liquid bucket and put it into inventory, if possible. -- Drop new bucket otherwise. - if new_bucket then - if itemstack:get_count() == 1 then - return new_bucket - else - local inv = user:get_inventory() - if inv:room_for_item("main", new_bucket) then - inv:add_item("main", new_bucket) - else - minetest.add_item(user:get_pos(), new_bucket) - end - if not minetest.is_creative_enabled(user:get_player_name()) then - itemstack:take_item() - end - return itemstack - end + if minetest.is_creative_enabled(user:get_player_name()) then --TODO + itemstack:take_item() end end, _on_dispense = function(stack, pos, droppos, dropnode, dropdir) diff --git a/mods/ITEMS/mcl_cauldrons/init.lua b/mods/ITEMS/mcl_cauldrons/init.lua index 8dff25f131..3b26ac34a1 100644 --- a/mods/ITEMS/mcl_cauldrons/init.lua +++ b/mods/ITEMS/mcl_cauldrons/init.lua @@ -4,6 +4,18 @@ mcl_cauldrons = {} -- Cauldron mod, adds cauldrons. local function give_item(user, itemstack) + if itemstack and user:is_player() and minetest.is_creative_enabled(user:get_player_name()) then + if itemstack:get_count() == 1 then + return itemstack + else + local inv = user:get_inventory() + if inv:room_for_item("main", itemstack) then + inv:add_item("main", itemstack) + else + minetest.add_item(user:get_pos(), new_bucket) + end + end + end end -- Convenience function because the cauldron nodeboxes are very similar