mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API
This commit is contained in:
parent
18882a4d26
commit
2e292b67a0
18 changed files with 163 additions and 14 deletions
|
@ -42,6 +42,7 @@ void MapgenSinglenodeParams::writeParams(Settings *settings) {
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MapgenSinglenode::MapgenSinglenode(int mapgenid, MapgenSinglenodeParams *params) {
|
||||
flags = params->flags;
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,8 +92,9 @@ void MapgenSinglenode::makeChunk(BlockMakeData *data) {
|
|||
updateLiquid(&data->transforming_liquid, node_min, node_max);
|
||||
|
||||
// Calculate lighting
|
||||
calcLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE,
|
||||
node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE);
|
||||
if (!(flags & MG_NOLIGHT))
|
||||
calcLighting(node_min - v3s16(1, 0, 1) * MAP_BLOCKSIZE,
|
||||
node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE);
|
||||
|
||||
this->generating = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue