fixed Torches can be placed on top of all type of fences

This commit is contained in:
Marvelco 2026-04-17 11:46:01 +03:00
parent a6cdeec75c
commit f31a5235a4

View file

@ -75,7 +75,8 @@ bool TorchTile::isConnection(Level *level, int x, int y, int z)
return true;
}
int tile = level->getTile(x, y, z);
if (tile == Tile::fence_Id || tile == Tile::netherFence_Id
Tile *below = (tile >= 0 && tile < Tile::TILE_NUM_COUNT) ? Tile::tiles[tile] : nullptr;
if (below != nullptr && below->getRenderShape() == Tile::SHAPE_FENCE
|| tile == Tile::glass_Id || tile == Tile::cobbleWall_Id)
{
return true;