this->ndef = data->nodedef;
// Hack: use minimum block coords for old code that assumes a single block
- v3s16 blockpos = data->blockpos_requested;
v3s16 blockpos_min = data->blockpos_min;
v3s16 blockpos_max = data->blockpos_max;
}
// Add dungeons
- if (flags & MG_DUNGEONS) {
+ if ((flags & MG_DUNGEONS) && (stone_surface_max_y >= node_min.Y)) {
DungeonParams dp;
dp.np_rarity = nparams_dungeon_rarity;
// Calculate lighting
if (flags & MG_LIGHT)
- calcLighting(node_min - v3s16(1, 1, 1) * MAP_BLOCKSIZE,
- node_max + v3s16(1, 0, 1) * MAP_BLOCKSIZE);
+ calcLighting(node_min, node_max);
this->generating = false;
}