1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-23 09:45:19 +01:00

Allow mapgen chunk size to be non-cubic (#16429)

This commit is contained in:
sfan5
2025-10-22 22:31:23 +02:00
committed by GitHub
parent 0f943e5810
commit f4977b1e33
14 changed files with 151 additions and 73 deletions

View File

@@ -200,9 +200,9 @@ bool ServerMap::blockpos_over_mapgen_limit(v3s16 p)
bool ServerMap::initBlockMake(v3s16 blockpos, BlockMakeData *data)
{
assert(data);
s16 csize = getMapgenParams()->chunksize;
const v3s16 csize = getMapgenParams()->chunksize;
const v3s16 bpmin = EmergeManager::getContainingChunk(blockpos, csize);
const v3s16 bpmax = bpmin + v3s16(1, 1, 1) * (csize - 1);
const v3s16 bpmax = bpmin + csize - v3s16(1);
if (!m_chunks_in_progress.insert(bpmin).second)
return false;