Definition at line 1483 of file TileDrawing.cs.
 1484    {
 1485        if (Main.tile[x, y] == null || !Main.tile[x, y].active())
 1486        {
 1487            return -1;
 1488        }
 1489        switch (Main.tile[x, y].type)
 1490        {
 1491        case 23:
 1492        case 661:
 1493            return 0;
 1494        case 60:
 1495            if (!((double)y > Main.worldSurface))
 1496            {
 1497                return 1;
 1498            }
 1499            return 5;
 1500        case 70:
 1501            return 6;
 1502        case 109:
 1503        case 492:
 1504            return 2;
 1505        case 147:
 1506            return 3;
 1507        case 199:
 1508        case 662:
 1509            return 4;
 1510        default:
 1511            return -1;
 1512        }
 1513    }
References Terraria.Main.tile, and Terraria.Main.worldSurface.
Referenced by Terraria.GameContent.Drawing.TileDrawing.GetTreeBiome().