mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
More world generators support
This commit is contained in:
parent
399bd9c362
commit
9cc2f93cfd
9 changed files with 209 additions and 30 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include "../voxels/Chunks.h"
|
||||
#include "../voxels/ChunksStorage.h"
|
||||
#include "../voxels/WorldGenerator.h"
|
||||
#include "../world/WorldTypes.h"
|
||||
#include "../graphics/Mesh.h"
|
||||
#include "../lighting/Lighting.h"
|
||||
#include "../files/WorldFiles.h"
|
||||
|
|
@ -26,7 +27,7 @@ ChunksController::ChunksController(Level* level, uint padding)
|
|||
chunks(level->chunks),
|
||||
lighting(level->lighting),
|
||||
padding(padding),
|
||||
generator(new WorldGenerator(level->content)) {
|
||||
generator(WorldTypes::createWorldGenerator(level->getWorld()->getType(), level->content)) {
|
||||
}
|
||||
|
||||
ChunksController::~ChunksController(){
|
||||
|
|
@ -130,4 +131,4 @@ void ChunksController::createChunk(int x, int z) {
|
|||
}
|
||||
chunk->setLoaded(true);
|
||||
chunk->setReady(true);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue