Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created July 17, 2013 23:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilzAdam/6025502 to your computer and use it in GitHub Desktop.
Save PilzAdam/6025502 to your computer and use it in GitHub Desktop.
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