diff --git a/mods/ITEMS/mcl_cauldrons/init.lua b/mods/ITEMS/mcl_cauldrons/init.lua index 301ac3e5a0..0f231be620 100644 --- a/mods/ITEMS/mcl_cauldrons/init.lua +++ b/mods/ITEMS/mcl_cauldrons/init.lua @@ -4,9 +4,9 @@ mcl_cauldrons = {} -- Cauldron mod, adds cauldrons. local function give_item(user, itemstack) - if itemstack and user:is_player() then - local inv = user:get_inventory() - if false then --minetest.is_creative_enabled(user:get_player_name()) then + local inv = user:get_inventory() + if inv then + --[[if false then --minetest.is_creative_enabled(user:get_player_name()) then if inv:contains_item("main", itemstack) then return false else @@ -16,13 +16,13 @@ local function give_item(user, itemstack) minetest.add_item(user:get_pos(), itemstack) end end + else]] + if inv:room_for_item("main", itemstack) then + inv:add_item("main", itemstack) else - if inv:room_for_item("main", itemstack) then - inv:add_item("main", itemstack) - else - minetest.add_item(user:get_pos(), itemstack) - end + minetest.add_item(user:get_pos(), itemstack) end + --end end return itemstack end