move test caves to base:demo
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user