1 Commits

Author SHA1 Message Date
1fd279435c fix crash due nil itemstack (#13)
* fix crashes due nil itemstacks
2023-03-10 21:30:49 +01:00
2 changed files with 2 additions and 0 deletions

View File

@ -28,6 +28,7 @@ local function reg_simple(name, def)
end
end,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if not itemstack then return end
local pname = clicker:get_player_name()
local iname = itemstack:get_name()
local dpos = vector.add((vector.multiply(minetest.facedir_to_dir(node.param2), -1)), pos)

View File

@ -44,6 +44,7 @@ minetest.register_node("home_workshop_misc:beer_tap", {
},
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
local inv = clicker:get_inventory()
if not itemstack then return end
local wieldname = itemstack:get_name()
if wieldname == "vessels:drinking_glass" then