summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
author12xx12 <44411062+12xx12@users.noreply.github.com>2021-03-05 13:28:36 +0100
committerGitHub <noreply@github.com>2021-03-05 13:28:36 +0100
commit5fa45182e87bc3c1b7d28ab74d914c93f9b6fbef (patch)
treeec11b0c0413317ded90f1c71bb6bbd06fdf399f7 /src
parentMark UNREACHABLE with intrinsics (diff)
downloadcuberite-5fa45182e87bc3c1b7d28ab74d914c93f9b6fbef.tar
cuberite-5fa45182e87bc3c1b7d28ab74d914c93f9b6fbef.tar.gz
cuberite-5fa45182e87bc3c1b7d28ab74d914c93f9b6fbef.tar.bz2
cuberite-5fa45182e87bc3c1b7d28ab74d914c93f9b6fbef.tar.lz
cuberite-5fa45182e87bc3c1b7d28ab74d914c93f9b6fbef.tar.xz
cuberite-5fa45182e87bc3c1b7d28ab74d914c93f9b6fbef.tar.zst
cuberite-5fa45182e87bc3c1b7d28ab74d914c93f9b6fbef.zip
Diffstat (limited to 'src')
-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();
}