From 89e18d61080d1ccc4990c82570b1f0672daa8509 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 12 Jan 2013 07:59:41 +0100 Subject: [PATCH] Only dig air Nodes --- worldedit/manipulations.lua | 8 +++++--- 1 file 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