Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Place1x2()

static void Terraria.WorldGen.Place1x2 ( int x,
int y,
ushort type,
int style )
inlinestatic

Definition at line 37561 of file WorldGen.cs.

37562 {
37563 short frameX = 0;
37564 if (type == 20)
37565 {
37566 frameX = (short)(genRand.Next(3) * 18);
37567 }
37568 if (Main.tile[x, y - 1] == null)
37569 {
37570 Main.tile[x, y - 1] = new Tile();
37571 }
37572 if (Main.tile[x, y + 1] == null)
37573 {
37574 Main.tile[x, y + 1] = new Tile();
37575 }
37576 if (SolidTile2(x, y + 1) & !Main.tile[x, y - 1].active())
37577 {
37578 short num = (short)(style * 40);
37579 Main.tile[x, y - 1].active(active: true);
37580 Main.tile[x, y - 1].frameY = num;
37581 Main.tile[x, y - 1].frameX = frameX;
37582 Main.tile[x, y - 1].type = type;
37583 Main.tile[x, y].active(active: true);
37584 Main.tile[x, y].frameY = (short)(num + 18);
37585 Main.tile[x, y].frameX = frameX;
37586 Main.tile[x, y].type = type;
37587 }
37588 }
static UnifiedRandom genRand
Definition WorldGen.cs:1215
static bool SolidTile2(Tile testTile)

References Terraria.DataStructures.Tile, Terraria.Main.tile, and System.type.