Fix crash when using lockpick in air

This commit is contained in:
Wuzzy 2019-08-30 02:53:58 +02:00
parent a25486c49a
commit b1aebd4f0c

View File

@ -61,6 +61,9 @@ minetest.register_tool(
stack_max = 1,
on_use = function(itemstack, player, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack
end
if math.random(1, 5) <= 1 then
local pos = pointed_thing.under