Created
July 17, 2013 23:31
-
-
Save PilzAdam/6025502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/init.lua b/init.lua | |
index f6e2a79..aa15f99 100644 | |
--- a/init.lua | |
+++ b/init.lua | |
@@ -395,7 +395,9 @@ minetest.register_on_generated(function(minp, maxp, seed) | |
end | |
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip") | |
local data = vm:get_data() | |
- for i,d in ipairs(data) do | |
+ local area = VoxelArea:new{emin, emax} | |
+ for i in area:iterp(minp, maxp) do | |
+ local d = data[i] | |
if d == air or d == stone_with_coal or d == stone_with_iron then | |
data[i] = air | |
elseif d == stone_with_mese or d == stone_with_diamond or d == lava_source then |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment