mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-08-20 09:57:09 +00:00
Fixed Grass spreading to Coarse Dirt and Podzol.
This commit is contained in:
parent
e740f34256
commit
604e24244c
|
|
@ -106,7 +106,7 @@ void GrassTile::tick(Level *level, int x, int y, int z, Random *random)
|
||||||
int yt = y + random->nextInt(5) - 3;
|
int yt = y + random->nextInt(5) - 3;
|
||||||
int zt = z + random->nextInt(3) - 1;
|
int zt = z + random->nextInt(3) - 1;
|
||||||
int above = level->getTile(xt, yt + 1, zt);
|
int above = level->getTile(xt, yt + 1, zt);
|
||||||
if (level->getTile(xt, yt, zt) == Tile::dirt_Id && level->getRawBrightness(xt, yt + 1, zt) >= MIN_BRIGHTNESS && Tile::lightBlock[above] <= 2)
|
if (level->getTile(xt, yt, zt) == Tile::dirt_Id && level->getData(xt, yt, zt) == 0 && level->getRawBrightness(xt, yt + 1, zt) >= MIN_BRIGHTNESS && Tile::lightBlock[above] <= 2)
|
||||||
{
|
{
|
||||||
level->setTileAndUpdate(xt, yt, zt, Tile::grass_Id);
|
level->setTileAndUpdate(xt, yt, zt, Tile::grass_Id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue