1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Add on_generated hook

This commit is contained in:
Perttu Ahola 2011-11-26 15:19:03 +02:00
parent 0dbb31afeb
commit 769cc9879f
5 changed files with 51 additions and 1 deletions

View file

@ -234,6 +234,11 @@ void * EmergeThread::Thread()
if(enable_mapgen_debug_info)
infostream<<"EmergeThread: generating"<<std::endl;
block = map.generateBlock(p, modified_blocks);
v3s16 minp = block->getPos()*MAP_BLOCKSIZE;
v3s16 maxp = minp + v3s16(1,1,1)*(MAP_BLOCKSIZE-1);
scriptapi_environment_on_generated(m_server->m_lua,
minp, maxp);
}
}