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

◆ Place1xX()

static void Terraria.WorldGen.Place1xX ( int x,
int y,
ushort type,
int style = 0 )
inlinestatic

Definition at line 33757 of file WorldGen.cs.

33758 {
33759 int num = style * 18;
33760 int num2 = 3;
33761 if (type == 92)
33762 {
33763 num2 = 6;
33764 }
33765 bool flag = true;
33766 for (int i = y - num2 + 1; i < y + 1; i++)
33767 {
33768 if (Main.tile[x, i] == null)
33769 {
33770 Main.tile[x, i] = new Tile();
33771 }
33772 if (Main.tile[x, i].active())
33773 {
33774 flag = false;
33775 }
33776 if (type == 93 && Main.tile[x, i].liquid > 0)
33777 {
33778 flag = false;
33779 }
33780 }
33781 if (flag && SolidTile2(x, y + 1))
33782 {
33783 for (int j = 0; j < num2; j++)
33784 {
33785 Main.tile[x, y - num2 + 1 + j].active(active: true);
33786 Main.tile[x, y - num2 + 1 + j].frameY = (short)(j * 18 + num2 * num);
33787 Main.tile[x, y - num2 + 1 + j].frameX = 0;
33788 Main.tile[x, y - num2 + 1 + j].type = type;
33789 }
33790 }
33791 }
static bool SolidTile2(Tile testTile)

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