Skip to content

Commit

Permalink
TallGrassGenerator: Fixed crash when too high
Browse files Browse the repository at this point in the history
  • Loading branch information
NiLSPACE committed Nov 10, 2014
1 parent 4b95f7c commit 9a50a1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Generating/FinishGen.cpp
Expand Up @@ -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 (
Expand Down

0 comments on commit 9a50a1f

Please sign in to comment.