optimization

This commit is contained in:
Caleb 2020-06-25 23:09:54 -06:00
parent c89bfb21c6
commit c8ff519607
1 changed files with 3 additions and 6 deletions

View File

@ -52,17 +52,14 @@ local function drill_dig_it0 (pos,player)
return
end
local node = minetest.get_node(pos)
local def = minetest.registered_nodes[node.name]
if node.name == "air" or node.name == "ignore" then return end
if node.name == "default:lava_source" then return end
if node.name == "default:lava_flowing" then return end
if node.name == "default:water_source" then minetest.remove_node(pos) return end
if node.name == "default:water_flowing" then minetest.remove_node(pos) return end
if node.name == "ignore" or not def then
return
else
def.on_dig(pos, node, player)
end
local def = minetest.registered_nodes[node.name]
if not def then return end
def.on_dig(pos, node, player)
end
local function drill_dig_it1 (player)