From 9a50a1fe0cc641a4ec931d733702b775292a6ab6 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Mon, 10 Nov 2014 21:55:13 +0100 Subject: [PATCH] TallGrassGenerator: Fixed crash when too high --- src/Generating/FinishGen.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Generating/FinishGen.cpp b/src/Generating/FinishGen.cpp index 18f8ee2bc1..b8afac09a6 100644 --- a/src/Generating/FinishGen.cpp +++ b/src/Generating/FinishGen.cpp @@ -199,6 +199,11 @@ void cFinishGenTallGrass::GenFinish(cChunkDesc & a_ChunkDesc) // Get the top block + 1. This is the place where the grass would finaly be placed: int y = a_ChunkDesc.GetHeight(x, z) + 1; + + if (y >= 255) + { + continue; + } // Check if long grass can be placed: if (