36370 {
36371 bool flag = false;
36372 if (Main.tile[x, y] == null)
36373 {
36374 Main.tile[x, y] =
new Tile();
36375 }
36376 if (Main.tile[x, y + 1] == null)
36377 {
36378 Main.tile[x, y + 1] =
new Tile();
36379 }
36380 if (!Main.tile[x, y].active() && Main.tile[x, y + 1].nactive() && Main.tileTable[Main.tile[x, y + 1].type])
36381 {
36382 flag = true;
36383 }
36384 if (
type == 78 && !Main.tile[x, y].active() && Main.tile[x, y + 1].nactive() && Main.tileSolid[Main.tile[x, y + 1].type] && !Main.tile[x, y + 1].halfBrick() && Main.tile[x, y + 1].slope() == 0)
36385 {
36386 flag = true;
36387 }
36388 if (flag)
36389 {
36390 Main.tile[x, y].active(active:
true);
36391 Main.tile[x, y].type = (ushort)
type;
36393 {
36394 Main.tile[x, y].frameX = 0;
36395 Main.tile[x, y].frameY = (
short)(style * 22);
36396 }
36397 else
36398 {
36399 Main.tile[x, y].frameX = (
short)(style * 18);
36400 Main.tile[x, y].frameY = 0;
36401 }
36403 {
36404 Main.tile[x, y].frameX = (
short)(18 *
genRand.Next(5));
36405 }
36406 }
36407 }
static UnifiedRandom genRand