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

◆ Place1x2Top()

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

Definition at line 37590 of file WorldGen.cs.

37591 {
37592 short frameX = 0;
37593 if (Main.tile[x, y - 1] == null)
37594 {
37595 Main.tile[x, y - 1] = new Tile();
37596 }
37597 if (Main.tile[x, y + 1] == null)
37598 {
37599 Main.tile[x, y + 1] = new Tile();
37600 }
37601 if (Main.tile[x, y - 1].nactive() && Main.tileSolid[Main.tile[x, y - 1].type] && !Main.tileSolidTop[Main.tile[x, y - 1].type] && !Main.tile[x, y + 1].active())
37602 {
37603 short num = (short)(style * 36);
37604 Main.tile[x, y].active(active: true);
37605 Main.tile[x, y].frameY = num;
37606 Main.tile[x, y].frameX = frameX;
37607 Main.tile[x, y].type = type;
37608 Main.tile[x, y + 1].active(active: true);
37609 Main.tile[x, y + 1].frameY = (short)(num + 18);
37610 Main.tile[x, y + 1].frameX = frameX;
37611 Main.tile[x, y + 1].type = type;
37612 }
37613 }

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