mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
move test caves to base:demo
This commit is contained in:
parent
5966ca5617
commit
c022e11c3b
4 changed files with 30 additions and 24 deletions
|
|
@ -341,7 +341,13 @@ void WorldGenerator::generate(voxel* voxels, int chunkX, int chunkZ) {
|
|||
}
|
||||
}
|
||||
}
|
||||
generateLines(prototype, voxels, chunkX, chunkZ);
|
||||
generateStructures(prototype, voxels, chunkX, chunkZ);
|
||||
}
|
||||
|
||||
void WorldGenerator::generateStructures(
|
||||
const ChunkPrototype& prototype, voxel* voxels, int chunkX, int chunkZ
|
||||
) {
|
||||
for (const auto& placement : prototype.structures) {
|
||||
if (placement.structure < 0 || placement.structure >= def.structures.size()) {
|
||||
logger.error() << "invalid structure index " << placement.structure;
|
||||
|
|
@ -380,7 +386,6 @@ void WorldGenerator::generate(voxel* voxels, int chunkX, int chunkZ) {
|
|||
}
|
||||
}
|
||||
}
|
||||
generateLines(prototype, voxels, chunkX, chunkZ);
|
||||
}
|
||||
|
||||
void WorldGenerator::generateLines(
|
||||
|
|
|
|||
|
|
@ -80,6 +80,9 @@ class WorldGenerator {
|
|||
void generateLines(
|
||||
const ChunkPrototype& prototype, voxel* voxels, int x, int z
|
||||
);
|
||||
void generateStructures(
|
||||
const ChunkPrototype& prototype, voxel* voxels, int x, int z
|
||||
);
|
||||
public:
|
||||
WorldGenerator(
|
||||
const GeneratorDef& def,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue