out of bounds check for placement tool

This commit is contained in:
tenplus1 2021-08-27 14:19:39 +01:00
parent e0046e2d91
commit 493f74d63f

@ -78,6 +78,11 @@ minetest.register_craftitem("protector:tool", {
return
end
-- do not place protector out of map bounds
if minetest.find_node_near(pos, 1, {"ignore"}) then
return
end
-- do we have protectors to use ?
local nod
local inv = user:get_inventory()