mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-11-01 00:00:17 +01:00
Only dig air Nodes
This commit is contained in:
parent
e5331d39ae
commit
89e18d6108
|
@ -314,8 +314,10 @@ worldedit.dig = function(pos1, pos2)
|
||||||
pos.y = pos1.y
|
pos.y = pos1.y
|
||||||
while pos.y <= pos2.y do
|
while pos.y <= pos2.y do
|
||||||
pos.z = pos1.z
|
pos.z = pos1.z
|
||||||
while pos.z <= pos2.z do
|
while pos.z <= pos2.z do#
|
||||||
env:dig_node(pos)
|
local node = env:get_node(pos)
|
||||||
|
if node.name == "air":
|
||||||
|
env:dig_node(pos)
|
||||||
pos.z = pos.z + 1
|
pos.z = pos.z + 1
|
||||||
end
|
end
|
||||||
pos.y = pos.y + 1
|
pos.y = pos.y + 1
|
||||||
|
@ -323,4 +325,4 @@ worldedit.dig = function(pos1, pos2)
|
||||||
pos.x = pos.x + 1
|
pos.x = pos.x + 1
|
||||||
end
|
end
|
||||||
return worldedit.volume(pos1, pos2)
|
return worldedit.volume(pos1, pos2)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user