Added no node check

master
DonBatman 2015-09-08 12:06:10 -07:00
parent 662e1a3ce7
commit 12514dc6b5
1 changed files with 3 additions and 0 deletions

View File

@ -15,6 +15,9 @@ minetest.register_tool( "mymasonhammer:hammer",{
inventory_image = "mymasonhammer_hammer.png",
wield_image = "mymasonhammer_hammer.png",
on_use = function(itemstack, user, pointed_thing)
if pointed_thing.type ~= "node" then
return
end
local pos = pointed_thing.under
local node = minetest.get_node(pos)
local default_material = {