summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2013-01-12 07:59:41 +0100
committersfan5 <sfan5@live.de>2013-01-12 07:59:41 +0100
commit89e18d61080d1ccc4990c82570b1f0672daa8509 (patch)
treed813e00f959ff37a51a8474e6e363b41054d4cdd
parente5331d39ae35b945017b5a4229dd089c196df95b (diff)
Only dig air Nodes
-rw-r--r--worldedit/manipulations.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/worldedit/manipulations.lua b/worldedit/manipulations.lua
index 02490ff..903a3b7 100644
--- a/worldedit/manipulations.lua
+++ b/worldedit/manipulations.lua
@@ -314,8 +314,10 @@ worldedit.dig = function(pos1, pos2)
pos.y = pos1.y
while pos.y <= pos2.y do
pos.z = pos1.z
- while pos.z <= pos2.z do
- env:dig_node(pos)
+ while pos.z <= pos2.z do#
+ local node = env:get_node(pos)
+ if node.name == "air":
+ env:dig_node(pos)
pos.z = pos.z + 1
end
pos.y = pos.y + 1
@@ -323,4 +325,4 @@ worldedit.dig = function(pos1, pos2)
pos.x = pos.x + 1
end
return worldedit.volume(pos1, pos2)
-end \ No newline at end of file
+end