summaryrefslogtreecommitdiffstats
path: root/src/Generating
diff options
context:
space:
mode:
Diffstat (limited to 'src/Generating')
-rw-r--r--src/Generating/SinglePieceStructuresGen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Generating/SinglePieceStructuresGen.cpp b/src/Generating/SinglePieceStructuresGen.cpp
index bd079d762..84b246715 100644
--- a/src/Generating/SinglePieceStructuresGen.cpp
+++ b/src/Generating/SinglePieceStructuresGen.cpp
@@ -64,7 +64,8 @@ public:
m_BiomeGen->GenBiomes({ChunkX, ChunkZ}, Biomes);
// Checks if the biome at the origin position is allowed
- if (!m_PiecePool.IsBiomeAllowed(Biomes[ChunkX + cChunkDef::Width * ChunkZ]))
+ auto Relative = cChunkDef::AbsoluteToRelative(Vector3i(a_OriginX, 1, a_OriginZ), {ChunkX, ChunkZ});
+ if (!m_PiecePool.IsBiomeAllowed(Biomes[Relative.x + cChunkDef::Width * Relative.z]))
{
return cStructurePtr();
}