fix leaves decaying

This commit is contained in:
Lord Cambion 2026-03-18 12:48:23 +01:00
parent 5180196d9b
commit 364c2039a5
2 changed files with 3 additions and 3 deletions

View file

@ -137,11 +137,11 @@ void LeafTile::tick(Level *level, int x, int y, int z, Random *random)
for (int yo = -r; yo <= r; yo++)
{
int t = level->getTile(x + xo, y + yo, z + zo);
if (t == (Tile::treeTrunk_Id||Tile::tree2Trunk_Id))
if (t == Tile::treeTrunk_Id || t == Tile::tree2Trunk_Id)
{
checkBuffer[(xo + WO) * WW + (yo + WO) * W + (zo + WO)] = 0;
}
else if (t == (Tile::leaves_Id||Tile::leaves2_Id))
else if (t == Tile::leaves_Id || t == Tile::leaves2_Id)
{
checkBuffer[(xo + WO) * WW + (yo + WO) * W + (zo + WO)] = -2;
}

View file

@ -39,7 +39,7 @@ void TreeTile2::onRemove(Level* level, int x, int y, int z, int id, int data)
for (int zo = -r; zo <= r; zo++)
{
int t = level->getTile(x + xo, y + yo, z + zo);
if (t == (Tile::leaves_Id||Tile::leaves2_Id))
if (t == Tile::leaves_Id || t == Tile::leaves2_Id)
{
int currentData = level->getData(x + xo, y + yo, z + zo);
if ((currentData & LeafTile::UPDATE_LEAF_BIT) == 0)