diff --git a/server/source/world/ServerWorld.cpp b/server/source/world/ServerWorld.cpp index fac18cdbd..edc66b872 100644 --- a/server/source/world/ServerWorld.cpp +++ b/server/source/world/ServerWorld.cpp @@ -53,10 +53,10 @@ void ServerWorld::createChunkNeighbours(ServerChunk *chunk) { gk::Vector3i surroundingChunks[6] = { {chunk->x() - 1, chunk->y(), chunk->z()}, {chunk->x() + 1, chunk->y(), chunk->z()}, - {chunk->x(), chunk->y(), chunk->z() - 1}, - {chunk->x(), chunk->y(), chunk->z() + 1}, {chunk->x(), chunk->y() - 1, chunk->z()}, {chunk->x(), chunk->y() + 1, chunk->z()}, + {chunk->x(), chunk->y(), chunk->z() - 1}, + {chunk->x(), chunk->y(), chunk->z() + 1}, }; for (u8 i = 0 ; i < 6 ; ++i) { diff --git a/server/source/world/TerrainGenerator.cpp b/server/source/world/TerrainGenerator.cpp index 6a914a8e8..7d2a15cee 100644 --- a/server/source/world/TerrainGenerator.cpp +++ b/server/source/world/TerrainGenerator.cpp @@ -82,9 +82,9 @@ void TerrainGenerator::fastNoiseGeneration(ServerChunk &chunk) const { } // Leaves - for(int ix = -3 ; ix <= 3 ; ix++) { + for(int iz = -3 ; iz <= 3 ; iz++) { for(int iy = -3 ; iy <= 3 ; iy++) { - for(int iz = -3 ; iz <= 3 ; iz++) { + for(int ix = -3 ; ix <= 3 ; ix++) { if(ix * ix + iy * iy + iz * iz < 8 + (rand() & 1) && !chunk.getBlock(x + ix, y + iy, z + h + iz)) { chunk.setBlockRaw(x + ix, y + iy, z + h + iz, m_leavesBlockID);