Fix crash when right clic with no wielded item on pot

This commit is contained in:
bri cassa 2021-08-16 21:35:00 +02:00
parent 0cbc98900a
commit 06a3ca6265

View File

@ -655,6 +655,7 @@ for _, row in ipairs(witchcraft.pot_new) do --change 'pot_new' to 'pot' for the
}, },
on_rightclick = function(pos, node, clicker, itemstack, _) on_rightclick = function(pos, node, clicker, itemstack, _)
local wield_item = itemstack:get_name() local wield_item = itemstack:get_name()
if wield_item == "" then return nil end
if wield_item == "vessels:glass_bottle" then if wield_item == "vessels:glass_bottle" then
local wield_items_count = itemstack:get_count() local wield_items_count = itemstack:get_count()