Skip to content

Instantly share code, notes, and snippets.

@Jordach
Created September 16, 2012 09:42
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 Jordach/3731783 to your computer and use it in GitHub Desktop.
Save Jordach/3731783 to your computer and use it in GitHub Desktop.
Stuff
local grass_gen = function( minp, maxp )
if maxp.y < 40 then
for lx = minp.x, maxp.x do
for ly = minp.y, maxp.y do
for lz = minp.z, maxp.z do
local p = { x = lx, y = ly, z = lz }
local n = minetest.env:get_node( p )
if n.name == "air" then
minetest.env:place_node( p, { name = "default:dirt_with_grass" } )
end
end
end
end
end
end
minetest.register_on_generated( grass_gen )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment