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

◆ Place3x3Wall()

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

Definition at line 35394 of file WorldGen.cs.

35395 {
35396 int num = x - 1;
35397 int num2 = y - 1;
35398 bool flag = true;
35399 for (int i = num; i < num + 3; i++)
35400 {
35401 for (int j = num2; j < num2 + 3; j++)
35402 {
35403 if (Main.tile[i, j].active() || Main.tile[i, j].wall == 0)
35404 {
35405 flag = false;
35406 break;
35407 }
35408 }
35409 }
35410 if (!flag)
35411 {
35412 return;
35413 }
35414 int num3 = 0;
35415 while (style > 35)
35416 {
35417 num3++;
35418 style -= 36;
35419 }
35420 int num4 = style * 54;
35421 int num5 = num3 * 54;
35422 for (int k = num; k < num + 3; k++)
35423 {
35424 for (int l = num2; l < num2 + 3; l++)
35425 {
35426 Main.tile[k, l].active(active: true);
35427 Main.tile[k, l].type = type;
35428 Main.tile[k, l].frameX = (short)(num4 + 18 * (k - num));
35429 Main.tile[k, l].frameY = (short)(num5 + 18 * (l - num2));
35430 }
35431 }
35432 }

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