celeron55/minetest — pull request #440 by Jeija (2013-01-23 19:40:54+00:00)
Title: Add minetest.env:set_nodes(list)

set_nodes(list)
list: a table that contains {pos, node} and/or {minp, maxp, node}
for {pos, node} sets node at pos
for {minp, maxp, node} makes a cuboid between these corners

Example:
```lua
local setnodes = function()
minetest.env:set_nodes(
{
{pos={x=0,y=0,z=0}, node = {name="default:wood"}},
{pos={x=0,y=1,z=0}, node = {name="default:stone"}},
{minp={x=2,y=12,z=2}, maxp={x=5,y=5, z=5}, node = {name="default:dirt"}},
{minp={x=6,y=16,z=6}, maxp={x=8,y=10,z=4}, node = {name="default:tree"}}
})
end

minetest.after(0, setnodes)
```
Using set_nodes with a table of nodes is up to 30% faster
Using set_nodes with an area (a cuboid defined by maxp and minp) is up to 60% faster.
Based on measurements with this script by PilzAdam and me: https://gist.github.com/4604759