From fe983a1a45b23c67cf6c758a4f0ffe6a8ba764d6 Mon Sep 17 00:00:00 2001 From: x12xx12x <44411062+12xx12@users.noreply.github.com> Date: Wed, 20 Apr 2022 00:10:35 +0200 Subject: Valid Height is now checked by vector. --- src/Generating/FinishGen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Generating') diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp index eafa6f804..0ce48f90c 100644 --- a/src/Generating/FinishGen.cpp +++ b/src/Generating/FinishGen.cpp @@ -555,7 +555,7 @@ void cFinishGenTallGrass::GenFinish(cChunkDesc & a_ChunkDesc) ) { y--; - if (!cChunkDef::IsValidHeight(y - 1)) + if (!cChunkDef::IsValidHeight({x, y - 1, z})) { failed = true; break; @@ -1986,7 +1986,7 @@ void cFinishGenOreNests::GenerateOre( for (int y = ysize; y >= 0; --y) { int BlockY = BaseY + y; - if (!cChunkDef::IsValidHeight(BlockY)) + if (!cChunkDef::IsValidHeight({BlockX, BlockY, BaseZ})) { Num++; // So that the cycle finishes even if the base coords wander away from the chunk continue; -- cgit v1.2.3