Added no node check
This commit is contained in:
parent
662e1a3ce7
commit
12514dc6b5
@ -15,6 +15,9 @@ minetest.register_tool( "mymasonhammer:hammer",{
|
|||||||
inventory_image = "mymasonhammer_hammer.png",
|
inventory_image = "mymasonhammer_hammer.png",
|
||||||
wield_image = "mymasonhammer_hammer.png",
|
wield_image = "mymasonhammer_hammer.png",
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
return
|
||||||
|
end
|
||||||
local pos = pointed_thing.under
|
local pos = pointed_thing.under
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local default_material = {
|
local default_material = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user