mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
Added generation seed support
This commit is contained in:
parent
37dd882fdb
commit
1038a79b78
11 changed files with 25 additions and 17 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "Chunk.h"
|
||||
#include "Chunks.h"
|
||||
#include "../world/World.h"
|
||||
#include "WorldGenerator.h"
|
||||
#include "../lighting/Lighting.h"
|
||||
#include "../graphics/VoxelRenderer.h"
|
||||
|
|
@ -32,7 +33,7 @@ void ChunksLoader::_thread(){
|
|||
if (state == LOAD){
|
||||
chunks.putChunk(chunk);
|
||||
if (!chunk->loaded){
|
||||
WorldGenerator::generate(chunk->voxels, chunk->x, chunk->y, chunk->z);
|
||||
WorldGenerator::generate(chunk->voxels, chunk->x, chunk->y, chunk->z, world.load()->seed);
|
||||
}
|
||||
|
||||
lighting.onChunkLoaded(chunk->x, chunk->y, chunk->z, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue