13425 {
13426 Tile tile = Main.tile[
X,
Y];
13427 if (tile == null)
13428 {
13429 return false;
13430 }
13431 if (!tile.active() && tile.liquid == 0 && Main.tile[
X,
Y + 1] !=
null &&
WorldGen.SolidTile(
X,
Y + 1))
13432 {
13433 tile.frameY = 0;
13434 tile.slope(0);
13435 tile.halfBrick(halfBrick:
false);
13436 if (Main.tile[
X,
Y + 1].type == 2 || Main.tile[
X,
Y + 1].type == 477)
13437 {
13438 int num = Main.rand.NextFromList<int>(6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24, 27, 30, 33, 36, 39, 42);
13439 switch (num)
13440 {
13441 case 21:
13442 case 24:
13443 case 27:
13444 case 30:
13445 case 33:
13446 case 36:
13447 case 39:
13448 case 42:
13449 num += Main.rand.Next(3);
13450 break;
13451 }
13453 tile.type = 3;
13454 tile.frameX = (
short)(num * 18);
13455 tile.CopyPaintAndCoating(Main.tile[
X,
Y + 1]);
13456 if (Main.netMode == 1)
13457 {
13458 NetMessage.SendTileSquare(-1,
X,
Y);
13459 }
13460 return true;
13461 }
13462 if (Main.tile[
X,
Y + 1].type == 109 || Main.tile[
X,
Y + 1].type == 492)
13463 {
13464 if (Main.rand.Next(2) == 0)
13465 {
13467 tile.type = 110;
13468 tile.frameX = (
short)(18 * Main.rand.Next(4, 7));
13469 tile.CopyPaintAndCoating(Main.tile[
X,
Y + 1]);
13470 while (tile.frameX == 90)
13471 {
13472 tile.frameX = (
short)(18 * Main.rand.Next(4, 7));
13473 }
13474 }
13475 else
13476 {
13478 tile.type = 113;
13479 tile.frameX = (
short)(18 * Main.rand.Next(2, 8));
13480 tile.CopyPaintAndCoating(Main.tile[
X,
Y + 1]);
13481 while (tile.frameX == 90)
13482 {
13483 tile.frameX = (
short)(18 * Main.rand.Next(2, 8));
13484 }
13485 }
13486 if (Main.netMode == 1)
13487 {
13488 NetMessage.SendTileSquare(-1,
X,
Y);
13489 }
13490 return true;
13491 }
13492 if (Main.tile[
X,
Y + 1].type == 60)
13493 {
13495 tile.type = 74;
13496 tile.frameX = (
short)(18 * Main.rand.Next(9, 17));
13497 tile.CopyPaintAndCoating(Main.tile[
X,
Y + 1]);
13498 if (Main.netMode == 1)
13499 {
13500 NetMessage.SendTileSquare(-1,
X,
Y);
13501 }
13502 return true;
13503 }
13504 if (Main.tile[
X,
Y + 1].type == 633)
13505 {
13507 tile.type = 637;
13508 tile.frameX = (
short)(18 * Main.rand.Next(6, 11));
13509 tile.CopyPaintAndCoating(Main.tile[
X,
Y + 1]);
13510 if (Main.netMode == 1)
13511 {
13512 NetMessage.SendTileSquare(-1,
X,
Y);
13513 }
13514 return true;
13515 }
13516 }
13517 return false;
13518 }