summaryrefslogtreecommitdiffstats
path: root/src/Generating/VillageGen.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-11-30 14:04:27 +0100
committerMattes D <github@xoft.cz>2016-12-01 17:45:31 +0100
commitbb78bd88b568b8d9bce561f25c930c545c316622 (patch)
tree33615f07c5a1f7043962cd56c2f09c497a4b2213 /src/Generating/VillageGen.cpp
parentUpdated the prefabs. (diff)
downloadcuberite-bb78bd88b568b8d9bce561f25c930c545c316622.tar
cuberite-bb78bd88b568b8d9bce561f25c930c545c316622.tar.gz
cuberite-bb78bd88b568b8d9bce561f25c930c545c316622.tar.bz2
cuberite-bb78bd88b568b8d9bce561f25c930c545c316622.tar.lz
cuberite-bb78bd88b568b8d9bce561f25c930c545c316622.tar.xz
cuberite-bb78bd88b568b8d9bce561f25c930c545c316622.tar.zst
cuberite-bb78bd88b568b8d9bce561f25c930c545c316622.zip
Diffstat (limited to 'src/Generating/VillageGen.cpp')
-rw-r--r--src/Generating/VillageGen.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Generating/VillageGen.cpp b/src/Generating/VillageGen.cpp
index e0804625a..ccea3338d 100644
--- a/src/Generating/VillageGen.cpp
+++ b/src/Generating/VillageGen.cpp
@@ -234,13 +234,14 @@ protected:
{
for (int x = MinX; x <= MaxX; x++)
{
- if (IsBlockWater(a_Chunk.GetBlockType(x, cChunkDef::GetHeight(a_HeightMap, x, z), z)))
+ auto height = cChunkDef::GetHeight(a_HeightMap, x, z);
+ if (IsBlockWater(a_Chunk.GetBlockType(x, height, z)))
{
- a_Chunk.SetBlockTypeMeta(x, cChunkDef::GetHeight(a_HeightMap, x, z), z, WaterRoadBlockType, WaterRoadBlockMeta);
+ a_Chunk.SetBlockTypeMeta(x, height, z, WaterRoadBlockType, WaterRoadBlockMeta);
}
else
{
- a_Chunk.SetBlockTypeMeta(x, cChunkDef::GetHeight(a_HeightMap, x, z), z, RoadBlockType, RoadBlockMeta);
+ a_Chunk.SetBlockTypeMeta(x, height, z, RoadBlockType, RoadBlockMeta);
}
}
}