diff --git a/src/world/generator/WorldGenerator.cpp b/src/world/generator/WorldGenerator.cpp index 14c0c5aa..0f79c4e8 100644 --- a/src/world/generator/WorldGenerator.cpp +++ b/src/world/generator/WorldGenerator.cpp @@ -162,9 +162,11 @@ void WorldGenerator::placeStructure( AABB aabb(position, position + size); for (int lcz = -1; lcz <= 1; lcz++) { for (int lcx = -1; lcx <= 1; lcx++) { - auto& otherPrototype = requirePrototype( - chunkX + lcx, chunkZ + lcz - ); + const auto& found = prototypes.find({chunkX + lcx, chunkZ + lcz}); + if (found == prototypes.end()) { + continue; + } + auto& otherPrototype = *found->second; auto chunkAABB = gen_chunk_aabb(chunkX + lcx, chunkZ + lcz); if (chunkAABB.intersect(aabb)) { otherPrototype.placements.emplace_back(