39239 {
39240 short frameX = 0;
39242 {
39243 frameX = (short)(
genRand.Next(3) * 18);
39244 }
39245 if (Main.tile[x, y - 1] == null)
39246 {
39247 Main.tile[x, y - 1] =
default(
Tile);
39248 }
39249 if (Main.tile[x, y + 1] == null)
39250 {
39251 Main.tile[x, y + 1] =
default(
Tile);
39252 }
39253 if (
SolidTile2(x, y + 1) & !Main.tile[x, y - 1].active())
39254 {
39255 short num = (short)(style * 40);
39256 Main.tile[x, y - 1].active(active:
true);
39257 Main.tile[x, y - 1].frameY =
num;
39258 Main.tile[x, y - 1].frameX = frameX;
39259 Main.tile[x, y - 1].type = type;
39260 Main.tile[x, y].active(active:
true);
39261 Main.tile[x, y].frameY = (short)(
num + 18);
39262 Main.tile[x, y].frameX = frameX;
39263 Main.tile[x, y].type = type;
39264 }
39265 }
static bool[] TreeSapling
Whether or not this tile is a sapling, which can grow into a tree based on the soil it's placed on....
static UnifiedRandom genRand
static bool SolidTile2(Tile testTile)